> > Which isn't quite true, unfortunately. To make this true, the act of
> > making the page DISCARDABLE should also zero it. Otherwise, you can tell
> > whether a page was discarded by whether it contains data, which in turn
>
> Not if you marked it discardable - you just said that zeroed it.
Well, that's the issue. It's more efficient if it doesn't.
> Since a page thats discarded will be returned as zero you just need a flag
> around if you care. Another approach would be to fault such pages so you
> pick up the buserr
Or just set up DISCARDABLE to at read/write not only clears the
DISCARDABLE flag, but also zeros the memory. That would make it
indistinguishable from a zero mapping.
Hmm... It's starting to sound like we are reinventing either zero mapping,
or lazy clear of zero pages...
-- Kenneth Albanowski (kjahds@kjahds.com, CIS: 70705,126)
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/