LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 09-17-2006, 01:33 AM   #1
panandsapphire
LQ Newbie
 
Registered: Aug 2006
Posts: 4

Rep: Reputation: 0
Thumbs up better use of page cache with 64 bit processor


hai everyone,

I found an idea of better use of page cache for 64 bit processors in linux symposium 2006.I am thinking of implementing this project. The idea is -

* increase page size so as to reduce TLB cache misses

* but this will lead to page cache wastage if size of file is small .suppose if size of page cache is 64 kb and size of file is 65kb then the file will take 2 page caches. and second page cache will contain only 1 kb data hence wasting remaining 63kb.To improve the condition we will allocate memory of required size from memory pool using Kmalloc and store the files of small sizes in those buffers.We will also keep a pointer to that buffer in the mapping data-structure of the corresponding file.

* Moreover any file-tail(last part of file that has very small size but still occupies a complete page cache)will be unpacked into a page cahe only when the file-tail is referenced by the kernel and as soon as the reference is over file-tail will again be repacked into buffers.

*since memory allocation from memory pool will allocate memory from low memeopry zone we can't implement it on 32 bit machines as low memory zone is already utilised for DMA support.But with 64 bit machines whole RAM comes under low and normal memory zones so no problem of memory will occur.

*We can also maintain seprate memory pools for allocation to file-tails and as such this can be implemented on 32 bit machines too.

I WOULD WELCOME SUGGESTIONS AND COMMENTS ON THIS IDEA.
THE BASIC IDEA IS OF DAVE AND BADRI FROM IBM AS SUBMITTED IN LINUX 2006 SYMPOSIUM.
 
Old 09-19-2006, 10:05 AM   #2
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
Quote:
* increase page size so as to reduce TLB cache misses
Currently memory page size is architecture dependent. Page sizes are determined by what is most efficient for the CPU to access. I think that consideration overrides any gains in TLB cache hit/miss ratio.

Quote:
but this will lead to page cache wastage if size of file is small ...
This is the same problem that you have when you are determining the block size for disk storage.

Since RAM is always considered a scarce resource then wasting RAM is unacceptable. Even if you have 64GB of RAM it is still considered a scarce resource because, presumably, you purchase the amount of RAM to meet your workload requirements. Small page sizes are less wasteful.

I wouldn't change the current model.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
32 bit apps on 64 bit processor khaleel5000 General 12 04-19-2006 07:55 AM
64 bit processor UGT001 Linux - Newbie 2 01-09-2005 08:26 PM
64 bit processor shanenin Linux - Software 1 08-01-2004 02:37 PM
how to adjust cache stream, when using mplayer through embedded page? sirpelidor Linux - Software 0 02-11-2004 11:53 AM
Where is page cache? zdz97 Linux - Hardware 2 09-16-2003 03:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 06:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration