linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [bisected] sys_paccept: disable paccept() causes my macbook pro to have an annoying whining sound
@ 2010-01-07  6:16 Justin Mattock
  2010-01-07  9:51 ` Andi Kleen
  2010-01-07 12:54 ` John W. Linville
  0 siblings, 2 replies; 8+ messages in thread
From: Justin Mattock @ 2010-01-07  6:16 UTC (permalink / raw)
  To: linux-wireless, Linux Kernel Mailing List

for a while I've been hearing this odd
annoying sound coming from my macbook pro
when the system is idle(no internet use tv/radio/web etc...)
as soon as I do anything(radio,web) the noise disappears.

here is a  url where they are experiencing the same issue:
https://help.ubuntu.com/community/MacBook1-1/Hardy
(down under whining noise);

here is is the result of my bisect:

2d4c8266774188cda7f7e612e6dfb8ad12c579d5 is the first bad commit
commit 2d4c8266774188cda7f7e612e6dfb8ad12c579d5
Author: Michael Kerrisk <mtk.manpages@googlemail.com>
Date:   Mon Sep 22 13:57:49 2008 -0700

    sys_paccept: disable paccept() until API design is resolved

    The reasons for disabling paccept() are as follows:

    * The API is more complex than needed.  There is AFAICS no demonstrated
      use case that the sigset argument of this syscall serves that couldn't
      equally be served by the use of pselect/ppoll/epoll_pwait + traditional
      accept().  Roland seems to concur with this opinion
      (http://thread.gmane.org/gmane.linux.kernel/723953/focus=732255).  I
      have (more than once) asked Ulrich to explain otherwise
      (http://thread.gmane.org/gmane.linux.kernel/723952/focus=731018), but he
      does not respond, so one is left to assume that he doesn't know of such
      a case.

    * The use of a sigset argument is not consistent with other I/O APIs
      that can block on a single file descriptor (e.g., read(), recv(),
      connect()).

    * The behavior of paccept() when interrupted by a signal is IMO strange:
      the kernel restarts the system call if SA_RESTART was set for the
      handler.  I think that it should not do this -- that it should behave
      consistently with paccept()/ppoll()/epoll_pwait(), which never restart,
      regardless of SA_RESTART.  The reasoning here is that the very purpose
      of paccept() is to wait for a connection or a signal, and that
      restarting in the latter case is probably never useful.  (Note: Roland
      disagrees on this point, believing that rather paccept() should be
      consistent with accept() in its behavior wrt EINTR
      (http://thread.gmane.org/gmane.linux.kernel/723953/focus=732255).)

    I believe that instead, a simpler API, consistent with Ulrich's other
    recent additions, is preferable:

    accept4(int fd, struct sockaddr *sa, socklen_t *salen, ind flags);

    (This simpler API was originally proposed by Ulrich:
    http://thread.gmane.org/gmane.linux.network/92072)

    If this simpler API is added, then if we later decide that the sigset
    argument really is required, then a suitable bit in 'flags' could be added
    to indicate the presence of the sigset argument.

    At this point, I am hoping we either will get a counter-argument from
    Ulrich about why we really do need paccept()'s sigset argument, or that he
    will resubmit the original accept4() patch.

    Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
    Cc: David Miller <davem@davemloft.net>
    Cc: Davide Libenzi <davidel@xmailserver.org>
    Cc: Alan Cox <alan@redhat.com>
    Cc: Ulrich Drepper <drepper@redhat.com>
    Cc: Jakub Jelinek <jakub@redhat.com>
    Cc: Roland McGrath <roland@redhat.com>
    Cc: Oleg Nesterov <oleg@tv-sign.ru>
    Cc: Christoph Hellwig <hch@lst.de>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

:040000 040000 075d833177c2ee952fa0003bd490d50cb16926ec
d5a2bc1dbca03d3c21e3740cddb6164de6df9cda M	net


I think I was pretty straight forward with it. i.g. a good kernel
no sound bad kernel whining sound.

Now looking into sys_paccept seems it's been removed
in place for accept4.
I went to go revert that manually but there's too much
that has changed in net/socket.c

what/how is the best way to really find out if
accept4/sys_paccept is where this noise is coming
from on my machine(reverting is a mess)?


-- 
Justin P. Mattock

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [bisected] sys_paccept: disable paccept() causes my macbook pro to  have an annoying whining sound
  2010-01-07  6:16 [bisected] sys_paccept: disable paccept() causes my macbook pro to have an annoying whining sound Justin Mattock
@ 2010-01-07  9:51 ` Andi Kleen
  2010-01-07 15:43   ` Justin P. Mattock
  2010-01-07 12:54 ` John W. Linville
  1 sibling, 1 reply; 8+ messages in thread
From: Andi Kleen @ 2010-01-07  9:51 UTC (permalink / raw)
  To: Justin Mattock; +Cc: linux-wireless, Linux Kernel Mailing List

Justin Mattock <justinmattock@gmail.com> writes:

> for a while I've been hearing this odd
> annoying sound coming from my macbook pro
> when the system is idle(no internet use tv/radio/web etc...)
> as soon as I do anything(radio,web) the noise disappears.
>
> here is a  url where they are experiencing the same issue:
> https://help.ubuntu.com/community/MacBook1-1/Hardy
> (down under whining noise);
>
> here is is the result of my bisect:

It's very unlikely that this patch causes power management issues.
I would suggest you double check the bisect.

-Andi

-- 
ak@linux.intel.com -- Speaking for myself only.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [bisected] sys_paccept: disable paccept() causes my macbook pro to have an annoying whining sound
  2010-01-07  6:16 [bisected] sys_paccept: disable paccept() causes my macbook pro to have an annoying whining sound Justin Mattock
  2010-01-07  9:51 ` Andi Kleen
@ 2010-01-07 12:54 ` John W. Linville
  2010-01-07 15:45   ` Justin P. Mattock
  1 sibling, 1 reply; 8+ messages in thread
From: John W. Linville @ 2010-01-07 12:54 UTC (permalink / raw)
  To: Justin Mattock; +Cc: linux-wireless, Linux Kernel Mailing List

On Wed, Jan 06, 2010 at 10:16:27PM -0800, Justin Mattock wrote:
> for a while I've been hearing this odd
> annoying sound coming from my macbook pro
> when the system is idle(no internet use tv/radio/web etc...)
> as soon as I do anything(radio,web) the noise disappears.
> 
> here is a  url where they are experiencing the same issue:
> https://help.ubuntu.com/community/MacBook1-1/Hardy
> (down under whining noise);
> 
> here is is the result of my bisect:
> 
> 2d4c8266774188cda7f7e612e6dfb8ad12c579d5 is the first bad commit
> commit 2d4c8266774188cda7f7e612e6dfb8ad12c579d5
> Author: Michael Kerrisk <mtk.manpages@googlemail.com>
> Date:   Mon Sep 22 13:57:49 2008 -0700
> 
>     sys_paccept: disable paccept() until API design is resolved

Any particular reason you sent this to linux-wireless??

-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [bisected] sys_paccept: disable paccept() causes my macbook pro to  have an annoying whining sound
  2010-01-07  9:51 ` Andi Kleen
@ 2010-01-07 15:43   ` Justin P. Mattock
  2010-01-07 16:02     ` Andi Kleen
  0 siblings, 1 reply; 8+ messages in thread
From: Justin P. Mattock @ 2010-01-07 15:43 UTC (permalink / raw)
  To: Andi Kleen; +Cc: linux-wireless, Linux Kernel Mailing List

On 01/07/10 01:51, Andi Kleen wrote:
> Justin Mattock<justinmattock@gmail.com>  writes:
>
>> for a while I've been hearing this odd
>> annoying sound coming from my macbook pro
>> when the system is idle(no internet use tv/radio/web etc...)
>> as soon as I do anything(radio,web) the noise disappears.
>>
>> here is a  url where they are experiencing the same issue:
>> https://help.ubuntu.com/community/MacBook1-1/Hardy
>> (down under whining noise);
>>
>> here is is the result of my bisect:
>
> It's very unlikely that this patch causes power management issues.
> I would suggest you double check the bisect.
>
> -Andi
>

I can try again..

As for the power management
I didn't think so.. sounds more
like vibration of a solder joint/capacitor

Justin P. Mattock

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [bisected] sys_paccept: disable paccept() causes my macbook pro to have an annoying whining sound
  2010-01-07 12:54 ` John W. Linville
@ 2010-01-07 15:45   ` Justin P. Mattock
  2010-01-07 20:37     ` John W. Linville
  0 siblings, 1 reply; 8+ messages in thread
From: Justin P. Mattock @ 2010-01-07 15:45 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, Linux Kernel Mailing List

On 01/07/10 04:54, John W. Linville wrote:
> On Wed, Jan 06, 2010 at 10:16:27PM -0800, Justin Mattock wrote:
>> for a while I've been hearing this odd
>> annoying sound coming from my macbook pro
>> when the system is idle(no internet use tv/radio/web etc...)
>> as soon as I do anything(radio,web) the noise disappears.
>>
>> here is a  url where they are experiencing the same issue:
>> https://help.ubuntu.com/community/MacBook1-1/Hardy
>> (down under whining noise);
>>
>> here is is the result of my bisect:
>>
>> 2d4c8266774188cda7f7e612e6dfb8ad12c579d5 is the first bad commit
>> commit 2d4c8266774188cda7f7e612e6dfb8ad12c579d5
>> Author: Michael Kerrisk<mtk.manpages@googlemail.com>
>> Date:   Mon Sep 22 13:57:49 2008 -0700
>>
>>      sys_paccept: disable paccept() until API design is resolved
>
> Any particular reason you sent this to linux-wireless??
>


because the bisect had resulted in
something with wireless, so I figured
it was the next best thing todo.

Justin P. Mattock

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [bisected] sys_paccept: disable paccept() causes my macbook pro to  have an annoying whining sound
  2010-01-07 15:43   ` Justin P. Mattock
@ 2010-01-07 16:02     ` Andi Kleen
  0 siblings, 0 replies; 8+ messages in thread
From: Andi Kleen @ 2010-01-07 16:02 UTC (permalink / raw)
  To: Justin P. Mattock; +Cc: Andi Kleen, linux-wireless, Linux Kernel Mailing List

> As for the power management
> I didn't think so.. sounds more
> like vibration of a solder joint/capacitor

Typically those are caused by power management -- cpu going in/out 
sleep states.

You can check by e.g. limiting your CPU to C1 with 
processor.max_cstate=1

-Andi
-- 
ak@linux.intel.com -- Speaking for myself only.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [bisected] sys_paccept: disable paccept() causes my macbook pro to have an annoying whining sound
  2010-01-07 15:45   ` Justin P. Mattock
@ 2010-01-07 20:37     ` John W. Linville
  2010-01-07 20:43       ` Justin P. Mattock
  0 siblings, 1 reply; 8+ messages in thread
From: John W. Linville @ 2010-01-07 20:37 UTC (permalink / raw)
  To: Justin P. Mattock; +Cc: linux-wireless, Linux Kernel Mailing List

On Thu, Jan 07, 2010 at 07:45:12AM -0800, Justin P. Mattock wrote:
> On 01/07/10 04:54, John W. Linville wrote:
> >On Wed, Jan 06, 2010 at 10:16:27PM -0800, Justin Mattock wrote:
> >>for a while I've been hearing this odd
> >>annoying sound coming from my macbook pro
> >>when the system is idle(no internet use tv/radio/web etc...)
> >>as soon as I do anything(radio,web) the noise disappears.
> >>
> >>here is a  url where they are experiencing the same issue:
> >>https://help.ubuntu.com/community/MacBook1-1/Hardy
> >>(down under whining noise);
> >>
> >>here is is the result of my bisect:
> >>
> >>2d4c8266774188cda7f7e612e6dfb8ad12c579d5 is the first bad commit
> >>commit 2d4c8266774188cda7f7e612e6dfb8ad12c579d5
> >>Author: Michael Kerrisk<mtk.manpages@googlemail.com>
> >>Date:   Mon Sep 22 13:57:49 2008 -0700
> >>
> >>     sys_paccept: disable paccept() until API design is resolved
> >
> >Any particular reason you sent this to linux-wireless??
> >
> 
> 
> because the bisect had resulted in
> something with wireless, so I figured
> it was the next best thing todo.

Well, if you say so. :-)  But, I'm not sure I see the connection
between sys_paccept and wireless...?

John
-- 
John W. Linville
linville@tuxdriver.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [bisected] sys_paccept: disable paccept() causes my macbook pro to have an annoying whining sound
  2010-01-07 20:37     ` John W. Linville
@ 2010-01-07 20:43       ` Justin P. Mattock
  0 siblings, 0 replies; 8+ messages in thread
From: Justin P. Mattock @ 2010-01-07 20:43 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, Linux Kernel Mailing List

On 01/07/10 12:37, John W. Linville wrote:
> On Thu, Jan 07, 2010 at 07:45:12AM -0800, Justin P. Mattock wrote:
>> On 01/07/10 04:54, John W. Linville wrote:
>>> On Wed, Jan 06, 2010 at 10:16:27PM -0800, Justin Mattock wrote:
>>>> for a while I've been hearing this odd
>>>> annoying sound coming from my macbook pro
>>>> when the system is idle(no internet use tv/radio/web etc...)
>>>> as soon as I do anything(radio,web) the noise disappears.
>>>>
>>>> here is a  url where they are experiencing the same issue:
>>>> https://help.ubuntu.com/community/MacBook1-1/Hardy
>>>> (down under whining noise);
>>>>
>>>> here is is the result of my bisect:
>>>>
>>>> 2d4c8266774188cda7f7e612e6dfb8ad12c579d5 is the first bad commit
>>>> commit 2d4c8266774188cda7f7e612e6dfb8ad12c579d5
>>>> Author: Michael Kerrisk<mtk.manpages@googlemail.com>
>>>> Date:   Mon Sep 22 13:57:49 2008 -0700
>>>>
>>>>      sys_paccept: disable paccept() until API design is resolved
>>>
>>> Any particular reason you sent this to linux-wireless??
>>>
>>
>>
>> because the bisect had resulted in
>> something with wireless, so I figured
>> it was the next best thing todo.
>
> Well, if you say so. :-)  But, I'm not sure I see the connection
> between sys_paccept and wireless...?
>
> John


yeah.. my bad..
I got too CC happy with this one.

I think andi is right by saying this
is a power management issue.

Justin P. Mattock

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-01-07 20:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-07  6:16 [bisected] sys_paccept: disable paccept() causes my macbook pro to have an annoying whining sound Justin Mattock
2010-01-07  9:51 ` Andi Kleen
2010-01-07 15:43   ` Justin P. Mattock
2010-01-07 16:02     ` Andi Kleen
2010-01-07 12:54 ` John W. Linville
2010-01-07 15:45   ` Justin P. Mattock
2010-01-07 20:37     ` John W. Linville
2010-01-07 20:43       ` Justin P. Mattock

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).