[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081106091548.GE4890@elte.hu>
Date: Thu, 6 Nov 2008 10:15:48 +0100
From: Ingo Molnar <mingo@...e.hu>
To: Jeremy Fitzhardinge <jeremy@...p.org>
Cc: Andi Kleen <andi@...stfloor.org>,
Alexander van Heukelum <heukelum@...tmail.fm>,
Cyrill Gorcunov <gorcunov@...il.com>,
Alexander van Heukelum <heukelum@...lshack.com>,
LKML <linux-kernel@...r.kernel.org>,
Thomas Gleixner <tglx@...utronix.de>,
"H. Peter Anvin" <hpa@...or.com>, lguest@...abs.org,
jeremy@...source.com, Steven Rostedt <srostedt@...hat.com>,
Mike Travis <travis@....com>
Subject: Re: [PATCH RFC/RFB] x86_64, i386: interrupt dispatch changes
* Jeremy Fitzhardinge <jeremy@...p.org> wrote:
> Why are the accesses locked? Is it because it does an update of the
> accessed bit in the descriptor? (We should be pre-setting them all
> anyway.)
yes, the accessed bit in the segment descriptor has to be updated in
an atomic transaction: the CPU has to do a MESI coherent
read+compare+write transaction, without damaging other updates to the
6 bytes segment descriptor.
Old OSs implemented paging to disk by swapping out segments based on
the accessed bit, and clearing the present and accessed bit when the
segment is swapped out.
But given that all our GDT entries have the accessed bit set on Linux,
there's no physical reason why the CPU should be using a locked cycle
here - only to stay compatible with ancient stuff.
So ... that notion just survived in the backwards-compatibility stream
of CPU enhancements, over the past 10 years.
On 64-bit Linux there's no reason to maintain that principle, so i'd
expect future CPUs to relax this even more, were it ever to show up on
the performance radar. Note that SYSCALL/SYSRET already optimize that
away.
Ingo
--
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