[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20070412.161623.71575524.davem@davemloft.net>
Date: Thu, 12 Apr 2007 16:16:23 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: paulus@...ba.org
Cc: torvalds@...ux-foundation.org, jeremy@...p.org, zach@...are.com,
rusty@...tcorp.com.au, ebiederm@...ssion.com, ak@....de,
mingo@...e.hu, 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
From: Paul Mackerras <paulus@...ba.org>
Date: Wed, 21 Mar 2007 11:03:14 +1100
> Linus Torvalds writes:
>
> > We should just do this natively. There's been several tests over the years
> > saying that it's much more efficient to do sti/cli as a simple store, and
> > handling the "oops, we got an interrupt while interrupts were disabled" as
> > a special case.
> >
> > 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.
>
> 64-bit powerpc does this now as well.
I was curious about this so I had a look.
There appears to be three pieces of state used to manage this
on powerpc, PACASOFTIRQEN(r13), PACAHARDIRQEN(r13) and the
SOFTE() in the stackframe.
Plus there is all of this complicated logic on trap entry and
exit to manage these three values properly.
local_irq_restore() doesn't look like a simple piece of code
either. Logically it should be simple, update the software
binary state, and if enabling see if any interrupts came in
while we were disable so we can run them.
Given all of that, is it really cheaper than just flipping the
bit in the cpu control register? :-/
-
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