lkml.org 
[lkml]   [2007]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 13/26] Xen-paravirt_ops: Consistently wrap paravirt ops callsites to make them patchable

* Linus Torvalds <torvalds@linux-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 linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-03-20 18:05    [W:0.194 / U:0.812 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site