[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070320170025.GA14329@elte.hu>
Date: Tue, 20 Mar 2007 18:00:25 +0100
From: Ingo Molnar <mingo@...e.hu>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Jeremy Fitzhardinge <jeremy@...p.org>,
Zachary Amsden <zach@...are.com>,
Rusty Russell <rusty@...tcorp.com.au>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Andi Kleen <ak@....de>, David Miller <davem@...emloft.net>,
akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
virtualization@...ts.osdl.org, xen-devel@...ts.xensource.com,
chrisw@...s-sol.org, anthony@...emonkey.ws, netdev@...r.kernel.org
Subject: Re: [patch 13/26] Xen-paravirt_ops: Consistently wrap paravirt ops callsites to make them patchable
* Linus Torvalds <torvalds@...ux-foundation.org> wrote:
> I have this dim memory that ARM has done it that way for a long time
> because it's so expensive to do a "real" cli/sti.
>
> And I think -rt does it for other reasons. It's just more flexible.
-rt doesnt wrap cli/sti anymore: spin_lock_irq*() doesnt disable irq
flags on -rt, thus the amount of real irqs-off sections is very small
and reviewable.
But nevertheless an incarnation of the code survived and is upstream
already, in the form of TRACE_IRQFLAGS lockdep code ;) This implements a
soft hardirq flag _today_: all that would be needed is for Xen to define
raw_local_irq_disable() as a NOP, and to use the
current->hardirqs_enabled as 'soft IRQ-off flag'.
Note that ->hardirqs_enabled is self-maintained, i.e. it's not just a
stupid shadow of the hardirq flag, it's an independently maintained flag
that does not rely on the existence of the hard flag.
[ this code even has its own debugging code, so out-of-sync-flags,
double-off and double-on is detected and complained about. So all the
hard stuff has already been done as part of lockdep, and it's even
long-term maintainable because under a native lockdep kernel we check
the soft flag against the hard flag. ]
so i think a soft cli/sti flag support should be merged/unified with the
trace_hardirqs_on()/trace_hardirqs_off() code.
Ingo
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists