[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.02.1105041640020.3005@ionos>
Date: Wed, 4 May 2011 16:46:18 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: Tejun Heo <tj@...nel.org>
cc: Pekka Enberg <penberg@...nel.org>, Ingo Molnar <mingo@...e.hu>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Jens Axboe <axboe@...nel.dk>,
Andrew Morton <akpm@...ux-foundation.org>,
werner <w.landgraf@...ru>, "H. Peter Anvin" <hpa@...or.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Christoph Lameter <cl@...ux.com>
Subject: Re: [block IO crash] Re: 2.6.39-rc5-git2 boot crashs
On Wed, 4 May 2011, Tejun Heo wrote:
> Hello,
>
> On Wed, May 04, 2011 at 04:10:29PM +0200, Thomas Gleixner wrote:
> > > cases where the generic implementation is used. Has anyone measured
> > > the difference against before the whole this_cpu conversion?
> >
> > Yes, that really wants to be done. The whole CMPXCHG_LOCAL ifdeffery
> > should have been avoided in the first place. this_cpu_cmpxchg can
> > really be implemented with preempt_enable/disable and the irqsafe
> > variant in any case.
>
> Yeah, slub code looks pretty scary with the #ifdefs. IIUC, the
> problem was that cmpxchg_double is an optimization for fast path which
> was already very light weight and an extra locked op or irq on/off
> would have made considerable difference.
>
> The cmpxchg_double optimization made the fast path go quite faster
> when CPU supports it but it may as well slow things down considerably
> if CPU doesn't, due to extra irq on/off's. Anyways, here's hoping
Not really.
CMPXCHG_LOCAL=n
local_irq_save();
handle_everything();
local_irq_restore();
vs.
CMPXCHG_LOCAL=y
do_prep();
local_irq_save();
emulate_cmpxchg();
local_irq_restore();
do_rest();
So you have local irq disable/enable in both cases. So for the case
where you don't have a local cmpxchg8b/16b available it's not worse
versus irq disable/enable than now. It just has the possible repeat
case when stuff changed between the prep and the actual cmpxchg, which
is the same problem when cmpxchg8b/16 is available.
Thanks,
tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists