Re: wake_up() takes long time to return



On 1/20/07, Arjan van de Ven <arjan@xxxxxxxxxxxxx> 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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: How to check if kernel sources are installed on a system?
    ... On Sat, 27 May 2006, Arjan van de Ven wrote: ... be of the wrong architecture for the running kernel. ... Brian F. G. Bidulock ¦ The reasonable man adapts himself to the ¦ ...
    (Linux-Kernel)
  • Re: X Windows Recommendation with OVMS
    ... Anything with kernel mode code, driver code, or other tight OS- ... dependencies is likely to be broken by Vista, ... needs fixing" is unlikely to be fixable by the end user (exceptions ...
    (comp.os.vms)
  • Re: fix off-by-one error in ioremap()
    ... On Thu, 2003-09-18 at 04:05, Arjan van de Ven wrote: ... As this bug has been in the kernel for years, ... the BIOS. ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: [PATCH 9/9] Add explicit bound checks in net/socket.c
    ... Arjan van de Ven ... | The sys_socketcallfunction has a very clever system for the copy ... | This is the last (well 9th of this series, but last in the kernel) such ... | right for the whole kernel, and detect introduction of new security ...
    (Linux-Kernel)
  • Compiling Driver code for 2.6 kernel
    ... Please Help me as i am newbie to 2.6 kernel. ... I have My driver code for 2.4.20 kernel. ... i am able to compile my source code and able to link all individual modules and generate final module.o. ... Is it required to use kernel source GNUMakefile as given in examples *** ...
    (Linux-Kernel)