Rik,
One of the best references that describes the bus transaction model for
Intel in "plain english" is the Pentium Pro Processor System
Architecture Manual by Tom Shanley of Mindshare, Inc., Addison Wesley,
ISBN: 0-201-47953-2. It explains a very good detail how the cache
controllers and MESI works on Intel.
The PTE is layed out on Intel:
63 36 35 12 11 9 8 7 6
5 4 3 2 1 0
Reserved(0) | 24 bits of page addr |
^
|
Page Accessed
If you need to know if the page has been accessed, you can clear this
bit when a page is first mapped, and when someone touches it, the
hardware will set this bit. It set's it by doing a R/M/W operation on
the PTE in memory and asserts LOCK# invisibly to the OS above -- you
will see it on a bus analyzer issuing a memory write transaction and
asserting LOCK#. If you don't care about this bit, when you map in
pages, and create a new PTE, it's wise to set the bit yourself when you
fill out the table. If you don't, the hardware will perform a locked
memory write (just like a spinlock) the first time someone touches the
page the PTE refers to. In NetWare, we didn't care if the page was
touched or not since we used our own bits in field bits 11-9 to store
page specific stuff, like whether the page was dirty or not. The same
applies to other types of descriptors that have an accessed bit as
well. What we were doing is always clearing this bit during PTE
updates, and were getting all these hidden locks that caused performance
to drop.
We saw a 4% performance improvement for Network I/O by avoiding the
"hidden" locking in Intel's architecture. You should check if you need
this bit, and if not, always create the PTE with it set. I don't know
how much it would help Linux. NetWare is well optimized for Intel
processors and any little thing that increased bus memory utilization
was very noticeable on NetWare, since it supports such huge user loads
already.
:-)
Jeff
Rik van Riel wrote:
>
> On Sun, 10 Sep 2000, Jeff V. Merkey wrote:
>
> > The person writing and updating page table entries in NetWare
> > 4.1 was clearing the accessed bit in the PTE and did not know
> > that the processor would assert a hidden R/M/W operation and
> > assert a bus lock to set this bit everytime someone cleared it
> > -- it made performance drop 4% from NetWare 3.X and noone knew
> > why.
>
> Hmmm, this sounds like an `interesting' incident that we need
> to know more about. Currently Linux may have some problems with
> the PTE modifying code so if you have any details about how
> exactly you are supposed to modify a PTE, we'd like to know ;)
>
> regards,
>
> Rik
> --
> "What you're running that piece of shit Gnome?!?!"
> -- Miguel de Icaza, UKUUG 2000
>
> http://www.conectiva.com/ http://www.surriel.com/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Fri Sep 15 2000 - 21:00:15 EST