Re: [rfc] no ZERO_PAGE?

From: Valdis . Kletnieks
Date: Wed Apr 04 2007 - 18:06:28 EST


On Wed, 04 Apr 2007 08:35:30 PDT, Linus Torvalds said:

> Although I don't know how much -mm will do for it. There is certainly not
> going to be any correctness problems, afaik, just *performance* problems.
> Does anybody do any performance testing on -mm?

I have to admit I don't do anything more definite than "wow, this goes oink"...

> That's an example of an app that actually cares about the page allocation
> (or, in this case, the lack there-of). Not an important one, but maybe
> there are important ones that care?

I'd not be surprised if there's sparse-matrix code out there that wants to
malloc a *huge* array (like a 1025x1025 array of numbers) that then only
actually *writes* to several hundred locations, and relies on the fact that
all the untouched pages read back all-zeros. Of course, said code is probably
buggy because it doesn't zero the whole thing because you don't usually know
if some other function already scribbled on that heap page.

This would probably be more interesting if we had a userspace API for
"Give me a metric buttload of zero page frames" that malloc() and friends
could leverage.....

Attachment: pgp00000.pgp
Description: PGP signature