lkml.org 
[lkml]   [2008]   [Feb]   [19]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateTue, 19 Feb 2008 08:02:53 -0500
FromMathieu Desnoyers <>
SubjectRe: Linux 2.6.25-rc2
* Ingo Molnar (mingo@elte.hu) wrote:
>
> * Pekka Enberg <penberg@cs.helsinki.fi> wrote:
>
> > Mathieu, Christoph is on vacation and I'm not at all that familiar
> > with this cmpxchg_local() optimization, so if you could take a peek at
> > this bug report to see if you can spot something obviously wrong with
> > it, I would much appreciate that.
>
> hm, it's bad for at least one other reason as well (which is probably
> unrelated to this crash):
>
> /*
> * Currently fastpath is not supported if preemption is enabled.
> */
> #if defined(CONFIG_FAST_CMPXCHG_LOCAL) && !defined(CONFIG_PREEMPT)
> #define SLUB_FASTPATH
> #endif
>
> such !PREEMPT exceptions tend to show "i didnt want to think too hard
> about the preemptible case so just turn it off" thinking.
>

Ingo, a comment in slub.c explains it :

/*
* The SLUB_FASTPATH path is provisional and is currently disabled if the
* kernel is compiled with preemption or if the arch does not support
* fast cmpxchg operations. There are a couple of coming changes that will
* simplify matters and allow preemption. Ultimately we may end up making
* SLUB_FASTPATH the default.
*
* 1. The introduction of the per cpu allocator will avoid array lookups
* through get_cpu_slab(). A special register can be used instead.
*
* 2. The introduction of per cpu atomic operations (cpu_ops) means that
* we can realize the logic here entirely with per cpu atomics. The
* per cpu atomic ops will take care of the preemption issues.
*/
So there is more coming in the preemption area.


> Also, why isnt this "SLUB_FASTPATH" flag done in the Kconfig space?
>

Eventually, I think only CONFIG_FAST_CMPXCHG_LOCAL will be needed (when
the code will support preemption). Therefore, this SLUB_FASTPATH define
seems to be only here temporarily.

I'm looking at the code right now.. more to come.

Mathieu

> Ingo

--
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 14:05    [from the cache]
©2003-2009