On Monday 22 October 2007 03:56, Eric W. Biederman wrote:
Well, the ones that are unused are totally useless ;) I would
have expected them to be removed.
I mean backported. That's just me though, I don't know the nuances
of -stable releases. It could be that they rather not risk introducing
something worse which would be fair enough.
OK it just didn't sound like it, seeing as you said that's the only
way they are accessed.
No. With my patch, nothing in the ramdisk code is visible to the LRU.
Which is how it should be.
It's not a cache, and it's not unaccounted for. It's specified exactly
with the rd sizing parameters. I don't know why you would say your
patch is better in this regard. Your ramdisk backing store will be
accounted as pagecache, which is completely wrong.
You can be using highmem, BTW. And technically it probably isn't
correct to use GFP_USER.
The small incremental step that fixes the problem is Christian's
patch.
Where else is this an established idiom?
It is smaller lines of code. It is a larger change. Because what you
are doing is 2 things. You are firstly discontinuing the use of the
buffer cache for the backing store, and secondly you are introducing
a new backing store which registers an inode with the vfs and pages
with the pagecache.
My patch does the same thing without those two last questionable
steps.
You now have to treat those backing store pages as pagecache pages,
and hope you have set the right flags and registered the right aops.
Any page you allocate is your private page. The problem is you're
just sending them back to the VM again.
-