Messages in this thread | | | Date | Tue, 19 Feb 2008 15:08:52 -0500 | From | Mathieu Desnoyers <> | Subject | Re: 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
| |