lkml.org 
[lkml]   [2008]   [Feb]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Linux 2.6.25-rc2
* Pekka Enberg (penberg@cs.helsinki.fi) wrote:
> Hi Mathieu,
>
> On Feb 19, 2008 4:02 PM, Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> wrote:
> > - stat(c, ALLOC_FASTPATH); seems to be using a var++, therefore
> > indicating it is not reentrant if IRQs are disabled. Since those are
> > only stats, I guess it's ok, but still weird.
>
> What is not re-entrant?
>

incrementing the variable with a "++" when interrupts are not disabled.
It's not an atomic add and it's racy. The code within stat() does
exactly this.

> On Feb 19, 2008 4:02 PM, Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> wrote:
> > Since this shows mostly with network card drivers, I think the most
> > plausible cause would be an IRQ nesting over kmem_cache_alloc_node and
> > calling it.
>
> Yes, this can happen. Are you saying it is not safe to be in the
> lockless path when an IRQ triggers?

It should be safe, but I think Eric pointed the correct problem in his
reply.

Thanks,

Mathieu

--
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68


\
 
 \ /
  Last update: 2008-02-19 21:11    [W:0.260 / U:0.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site