LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* wake_up() takes long time to return
@ 2007-01-20 10:24 kalash nainwal
  2007-01-20 14:47 ` Arjan van de Ven
  0 siblings, 1 reply; 3+ messages in thread
From: kalash nainwal @ 2007-01-20 10:24 UTC (permalink / raw)
  To: netdev, linux-kernel

Hi there,

We've a kernel (n/w) module, which sits over ethernet. Whenever a pkt
is received (in softirq), after doing some minimal processing,
wake_up() is called to wake up another kernel thread which does rest
(bulk) of the processing.

We notice that this wake_up() call is sometimes taking as long as 48
milli-seconds to return. This happens around 10 times out of 10M. We
earlier thought its possibly because of the contention on rq->lock,
but we see the same phenomenon even on a uniprocessor box. So obviosly
thats not the case.

We can't figure out any other reason for wake_up() to take this much
time? As this call comes directly in our (receive) hotpath, we're very
concerned. Any help would be greatly appreciated.

Thanks and regards,
-Kalash

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

* Re: wake_up() takes long time to return
  2007-01-20 10:24 wake_up() takes long time to return kalash nainwal
@ 2007-01-20 14:47 ` Arjan van de Ven
  2007-01-22  9:26   ` kalash nainwal
  0 siblings, 1 reply; 3+ messages in thread
From: Arjan van de Ven @ 2007-01-20 14:47 UTC (permalink / raw)
  To: kalash nainwal; +Cc: netdev, linux-kernel

On Sat, 2007-01-20 at 15:54 +0530, kalash nainwal wrote:
> Hi there,
> 
> We've a kernel (n/w) module, which sits over ethernet. Whenever a pkt
> is received (in softirq), after doing some minimal processing,
> wake_up() is called to wake up another kernel thread which does rest
> (bulk) of the processing.
> 
> We notice that this wake_up() call is sometimes taking as long as 48
> milli-seconds to return. This happens around 10 times out of 10M. We
> earlier thought its possibly because of the contention on rq->lock,
> but we see the same phenomenon even on a uniprocessor box. So obviosly
> thats not the case.
> 
> We can't figure out any other reason for wake_up() to take this much
> time? As this call comes directly in our (receive) hotpath, we're very
> concerned. Any help would be greatly appreciated.


Hi,

unfortunately you didn't provide your driver code or a link to it, so
people who want to help you would have to guess in the dark... could you
reply to this email with the pointer to the code?

Greetings,
   Arjan van de Ven
-- 
if you want to mail me at work (you don't), use arjan (at) linux.intel.com
Test the interaction between Linux and your BIOS via http://www.linuxfirmwarekit.org


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

* Re: wake_up() takes long time to return
  2007-01-20 14:47 ` Arjan van de Ven
@ 2007-01-22  9:26   ` kalash nainwal
  0 siblings, 0 replies; 3+ messages in thread
From: kalash nainwal @ 2007-01-22  9:26 UTC (permalink / raw)
  To: Arjan van de Ven; +Cc: netdev, linux-kernel

On 1/20/07, Arjan van de Ven <arjan@infradead.org> wrote:
> On Sat, 2007-01-20 at 15:54 +0530, kalash nainwal wrote:
> > Hi there,
> >
> > We've a kernel (n/w) module, which sits over ethernet. Whenever a pkt
> > is received (in softirq), after doing some minimal processing,
> > wake_up() is called to wake up another kernel thread which does rest
> > (bulk) of the processing.
> >
> > We notice that this wake_up() call is sometimes taking as long as 48
> > milli-seconds to return. This happens around 10 times out of 10M. We
> > earlier thought its possibly because of the contention on rq->lock,
> > but we see the same phenomenon even on a uniprocessor box. So obviosly
> > thats not the case.
> >
> > We can't figure out any other reason for wake_up() to take this much
> > time? As this call comes directly in our (receive) hotpath, we're very
> > concerned. Any help would be greatly appreciated.
>
>
> Hi,
>
> unfortunately you didn't provide your driver code or a link to it, so
> people who want to help you would have to guess in the dark... could you
> reply to this email with the pointer to the code?
>
> Greetings,
>    Arjan van de Ven
> --
> if you want to mail me at work (you don't), use arjan (at) linux.intel.com
> Test the interaction between Linux and your BIOS via http://www.linuxfirmwarekit.org
>
>

Hi Arjan,

I won't pretend I'm working on an open-source driver. I personally
would be more than happy to share the driver code, but doing so would
probably cost me my job :)

and so...I won't expect anyone to help me with my code either.

Just wanted to know if wake_up is known to take this long to return?
(some known linux quirk may be?) If so then under what conditions? or
it _definitely_ would be my code only that's screwing up?

I'm using do_gettimeofday() before and after wake_up() to measure this time.

Thanks and regards,
-Kalash

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

end of thread, other threads:[~2007-01-22  9:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-20 10:24 wake_up() takes long time to return kalash nainwal
2007-01-20 14:47 ` Arjan van de Ven
2007-01-22  9:26   ` kalash nainwal

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).