Skip to contentSkip to conversation

Limit the size of the pagecache

RFC Bodo Eggert 1 participant 1 message Jan 25, 2007 4 messages not in the archive Memory management

lore
Share & tools
lore
#4 lore raw
In reply to a message not in the archive
Quoted 6 lines · Peter Zijlstra
Quoted 5 lines · Aubrey Li
Quoted 2 lines · Peter Zijlstra

He wants to make a nommu system act like a mmu system; this will just never ever work.

Quoted 6 lines
Quoted 2 lines

Nope. Actually my nommu system works great with some of patches made by us. What let you think this will never work?

Because there are perfectly valid things user-space can do to mess you up. I forgot the test-case but it had something to do with opening a million files, this will scatter slab pages all over the place.

a) Limit the number of open files.
b) Don't do that then.

Quoted 5 lines

Also, if you cycle your large user-space allocations a bit unluckily you'll also fragment it into oblivion.

So you can not guarantee it will not fragment into smithereens stopping your user-space from using large than page size allocations.

Therefore you should purposely increase the mess up to the point where the system is guaranteed not to work? IMO you should rather put the other issues onto the TODO list.

BTW: I'm not sure a hard limit is the right thing to do for mmu systems, I'd rather implement high and low watermarks; if one pool is larger than it's high watermark, it will be next get it's pages evicted, and it won't lose pages if it's at the lower watermark.

Quoted 7 lines

If your user-space consists of several applications that do dynamic memory allocation of various sizes its a matter of (run-) time before things will start failing.

If you prealloc a large area at boot time (like we now do for hugepages) and use that for user-space, you might 'reset' the status quo by cycling the whole of userspace.

Preallocating the page cache (and maybe the slab space?) may very well be the right thing to do for nommu systems. It worked quite well in DOS times and on old MACs.

Signature · 10 lines
Funny quotes:
30. Why is a person who plays the piano called a pianist but a person who
    drives a race car not called a racist?
Friss, Spammer: [email protected] [email protected]

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>