Skip to contentSkip to conversation

Zero Pages / Cache Coherency

DISCUSSION Adrian Cox 3 participants 3 messages Aug 27, 1999 – Aug 30, 1999

lore
Share & tools
lore

Adrian Cox

author
#0 lore raw

I'm currently trying out the pre-zeroing of pages in the idle task, and I'm a little worried about its effect on cache-coherency. I can't prove to
my satisfaction that none of the pages being cleared by zero_paged() is in the cache, and I'm not sure that turning off caching in the PTE will have any effect on cache lines already allocated in L1 or L2.

Obviously, any incoherency would be extremely rare, but ensuring that the page is invalidated from the caches before it is zeroed has the added bonus of removing the need for a flush_page_to_ram() in my modified anonymous memory allocator.

Any comments?

- Adrian Cox, AG Electronics

[[ This message was sent via the linuxppc-dev mailing list. Replies are ]] [[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]] [[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting. ]]

#1 lore raw

On 27 Aug, this message from Adrian Cox echoed through cyberspace:

Quoted 7 lines

I'm currently trying out the pre-zeroing of pages in the idle task, and I'm a little worried about its effect on cache-coherency. I can't prove to
my satisfaction that none of the pages being cleared by zero_paged() is in the cache, and I'm not sure that turning off caching in the PTE will have any effect on cache lines already allocated in L1 or L2.

Cort Dougan had a paper about memory management in Linux on the PowerPC online at NMT, but at this time the link is broken
(http://www.cs.nmt.edu/~cort/papers/linuxppc-mm/). If I remeber right, he also spoke about zeroing pegaes in the idle task.

Cort, are you among us? What's up with your personal pages?

Quoted 4 lines

Obviously, any incoherency would be extremely rare, but ensuring that the page is invalidated from the caches before it is zeroed has the added bonus of removing the need for a flush_page_to_ram() in my modified anonymous memory allocator.

I can't remeber whether Cort also treated this subject.

Michel

-------------------------------------------------------------------------

Michel Lanners                 |  " Read Philosophy.  Study Art.
23, Rue Paul Henkes            |    Ask Questions.  Make Mistakes.
L-1710 Luxembourg              |
email   [email protected]            |
http://www.cpu.lu/~mlan        |                     Learn Always. "

[[ This message was sent via the linuxppc-dev mailing list. Replies are ]] [[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]] [[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting. ]]

#2 lore raw
Quoted 8 lines · Michel Lanners

On 27 Aug, this message from Adrian Cox echoed through cyberspace:

Quoted 6 lines

I'm currently trying out the pre-zeroing of pages in the idle task, and I'm a little worried about its effect on cache-coherency. I can't prove to
my satisfaction that none of the pages being cleared by zero_paged() is in the cache, and I'm not sure that turning off caching in the PTE will have any effect on cache lines already allocated in L1 or L2.

Quoted 4 lines

Cort Dougan had a paper about memory management in Linux on the PowerPC online at NMT, but at this time the link is broken
(http://www.cs.nmt.edu/~cort/papers/linuxppc-mm/). If I remeber right, he also spoke about zeroing pegaes in the idle task.

Since I deleted it only this afternoon when cleaning up my homedir, I was able to restore it from backup (DLT-jukeboxes are nice :-)

http://www.cs.kuleuven.ac.be/~geert/bin/linuxppc-mm.ps.gz

Will be autoremoved on September 4.

Greetings,

Geert

--
Geert Uytterhoeven [email protected]
Wavelets, Linux/{m68k~Amiga,PPC~CHRP} http://www.cs.kuleuven.ac.be/~geert/
Department of Computer Science -- Katholieke Universiteit Leuven -- Belgium

[[ This message was sent via the linuxppc-dev mailing list. Replies are ]] [[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]] [[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting. ]]