Re: [PATCH] rd: Use a private inode for backing storage

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Eric W. Biederman
Date: Sunday, October 21, 2007 - 10:56 am

Nick Piggin <nickpiggin@yahoo.com.au> writes:


Not totally useless as you have mentioned they are accessed by
the lru so we still need something there just not much.


Of course it should be fixed.  I just don't know if a backport
makes sense.  The problem once understood is hard to trigger
and easy to avoid.


Yes.  We will be accessed via the LRU.  Yes I knew that.  The truth is
whatever we do we will be visible to the LRU.  My preferences run
towards having something that is less of a special case then a new
potentially huge cache that is completely unaccounted for, that we
have to build and maintain all of the infrastructure for
independently.  The ramdisk code doesn't seem interesting enough
long term to get people to do independent maintenance.

With my patch we are on the road to being just like the ramdisk
for maintenance purposes code except having a different GFP mask.

I think I might have to send in a patch that renames
block_invalidatepage to block_invalidate_page which is how everyone
seems to be spelling it. 

Anyway nothing in the ramdisk code sets PagePrivate o
block_invalidagepage should never be called, nor try_to_free_buffers
for that matter.


Well we each have different tastes.  I think my patch
is a sane sensible small incremental step that does just what
is needed to fix the problem.   It doesn't drag a lot of other
stuff into the problem like a rewrite would so we can easily verify
it.


Quite true.  I noticed the breakage in mine because the patch
was so simple, and I only had to worry about one aspect.  With
a rewrite I missed it because there was so much other noise I
couldn't see any issues.



I did but but that is relatively minor.  Using the pagecache this
way for this purpose is a well established idiom in the kernel
so I didn't figure I was introducing anything to hard to maintain.


I am continuing to have the backing store pages visible to the VM,
and from that perspective it is a smaller change then where we are
today.  Not that we can truly hide pages from the VM. 


The code in rd.c isn't terrible, and it isn't shit.  There is only one
fundamental problem with it.  rd.c is fundamentally incompatible with
the buffer cache.  Currently rd.c is a legitimate if a bit ugly
user of the page cache.  The ugliness comes from working around
the buffer cache placing buffer heads on it's pages.

With my patch I stop using the same pages as the buffer cache which
removes that one fundamental problem.

Once we get the problem actually fixed I have no problem with
cleaning up the code.  I even have patches queued I just believe
in only changing one thing at a time if I can.

Eric
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH resend] ramdisk: fix zeroed ramdisk pages on memory ..., Christian Borntraeger, (Mon Oct 15, 1:28 am)
Re: [PATCH resend] ramdisk: fix zeroed ramdisk pages on me ..., Christian Borntraeger, (Mon Oct 15, 2:05 am)
Re: [PATCH resend] ramdisk: fix zeroed ramdisk pages on me ..., Eric W. Biederman, (Mon Oct 15, 11:38 am)
Re: [PATCH resend] ramdisk: fix zeroed ramdisk pages on me ..., Eric W. Biederman, (Mon Oct 15, 3:37 pm)
[PATCH] rd: Preserve the dirty bit in init_page_buffers(), Eric W. Biederman, (Mon Oct 15, 3:40 pm)
[PATCH] rd: Mark ramdisk buffers heads dirty, Eric W. Biederman, (Mon Oct 15, 3:42 pm)
Re: [PATCH resend] ramdisk: fix zeroed ramdisk pages on me ..., Eric W. Biederman, (Mon Oct 15, 8:14 pm)
Re: [PATCH resend] ramdisk: fix zeroed ramdisk pages on me ..., Eric W. Biederman, (Mon Oct 15, 9:57 pm)
[patch][rfc] rewrite ramdisk, Nick Piggin, (Tue Oct 16, 12:47 am)
Re: [patch][rfc] rewrite ramdisk, Jan Engelhardt, (Tue Oct 16, 12:52 am)
Re: [PATCH] rd: Mark ramdisk buffers heads dirty, Christian Borntraeger, (Tue Oct 16, 12:56 am)
Re: Re: [PATCH] rd: Mark ramdisk buffers heads dirty, rubenjr_22, (Tue Oct 16, 1:05 am)
Re: [patch][rfc] rewrite ramdisk, Nick Piggin, (Tue Oct 16, 1:07 am)
Re: Re: [PATCH] rd: Mark ramdisk buffers heads dirty, rubenjr_22, (Tue Oct 16, 1:13 am)
Re: [patch][rfc] rewrite ramdisk, Jan Engelhardt, (Tue Oct 16, 1:17 am)
Re: [PATCH] rd: Mark ramdisk buffers heads dirty, Nick Piggin, (Tue Oct 16, 1:19 am)
Re: [patch][rfc] rewrite ramdisk, Nick Piggin, (Tue Oct 16, 1:26 am)
Re: [PATCH] rd: Mark ramdisk buffers heads dirty, Christian Borntraeger, (Tue Oct 16, 1:48 am)
Re: [patch][rfc] rewrite ramdisk, Jan Engelhardt, (Tue Oct 16, 1:53 am)
Re: [patch][rfc] rewrite ramdisk, Eric W. Biederman, (Tue Oct 16, 2:08 am)
Re: [PATCH] rd: Mark ramdisk buffers heads dirty, Eric W. Biederman, (Tue Oct 16, 2:22 am)
Re: [PATCH] rd: Preserve the dirty bit in init_page_buffers(), Eric W. Biederman, (Tue Oct 16, 2:35 am)
Re: [PATCH] rd: Mark ramdisk buffers heads dirty, Eric W. Biederman, (Tue Oct 16, 12:06 pm)
Re: [patch][rfc] rewrite ramdisk, Theodore Tso, (Tue Oct 16, 2:28 pm)
Re: [PATCH] rd: Mark ramdisk buffers heads dirty, Nick Piggin, (Tue Oct 16, 3:06 pm)
Re: [patch][rfc] rewrite ramdisk, Nick Piggin, (Tue Oct 16, 3:08 pm)
Re: [patch][rfc] rewrite ramdisk, Eric W. Biederman, (Tue Oct 16, 4:48 pm)
Re: [patch][rfc] rewrite ramdisk, Nick Piggin, (Tue Oct 16, 5:28 pm)
Re: [patch][rfc] rewrite ramdisk, Eric W. Biederman, (Tue Oct 16, 6:13 pm)
Re: [patch][rfc] rewrite ramdisk, Nick Piggin, (Tue Oct 16, 6:47 pm)
Re: [patch][rfc] rewrite ramdisk, Eric W. Biederman, (Wed Oct 17, 3:30 am)
Re: [patch][rfc] rewrite ramdisk, Nick Piggin, (Wed Oct 17, 5:49 am)
Re: [PATCH] rd: Mark ramdisk buffers heads dirty, Christian Borntraeger, (Wed Oct 17, 9:14 am)
Re: [PATCH] rd: Mark ramdisk buffers heads dirty, Eric W. Biederman, (Wed Oct 17, 10:57 am)
Re: [patch][rfc] rewrite ramdisk, Eric W. Biederman, (Wed Oct 17, 11:45 am)
Re: [PATCH] rd: Mark ramdisk buffers heads dirty, Chris Mason, (Wed Oct 17, 12:14 pm)
Re: [PATCH] rd: Mark ramdisk buffers heads dirty, Eric W. Biederman, (Wed Oct 17, 1:29 pm)
Re: [PATCH] rd: Mark ramdisk buffers heads dirty, Chris Mason, (Wed Oct 17, 1:54 pm)
Re: [PATCH] rd: Mark ramdisk buffers heads dirty, Eric W. Biederman, (Wed Oct 17, 2:30 pm)
Re: [PATCH] rd: Mark ramdisk buffers heads dirty, Christian Borntraeger, (Wed Oct 17, 2:48 pm)
Re: [PATCH] rd: Mark ramdisk buffers heads dirty, Eric W. Biederman, (Wed Oct 17, 3:22 pm)
Re: [PATCH] rd: Mark ramdisk buffers heads dirty, Chris Mason, (Wed Oct 17, 3:58 pm)
Re: [PATCH] rd: Mark ramdisk buffers heads dirty, Eric W. Biederman, (Wed Oct 17, 4:28 pm)
Re: [PATCH] rd: Mark ramdisk buffers heads dirty, Chris Mason, (Wed Oct 17, 5:03 pm)
Re: [patch][rfc] rewrite ramdisk, Nick Piggin, (Wed Oct 17, 6:06 pm)
Re: [PATCH] rd: Mark ramdisk buffers heads dirty, Eric W. Biederman, (Wed Oct 17, 8:27 pm)
[RFC][PATCH] block: Isolate the buffer cache in it's own m ..., Eric W. Biederman, (Wed Oct 17, 8:59 pm)
Re: [PATCH] rd: Mark ramdisk buffers heads dirty, Christian Borntraeger, (Thu Oct 18, 2:26 am)
Re: [RFC][PATCH] block: Isolate the buffer cache in it's o ..., Eric W. Biederman, (Fri Oct 19, 2:27 pm)
Re: [RFC][PATCH] block: Isolate the buffer cache in it's o ..., Eric W. Biederman, (Fri Oct 19, 2:35 pm)
Re: [PATCH] rd: Mark ramdisk buffers heads dirty, Eric W. Biederman, (Fri Oct 19, 3:46 pm)
[PATCH] rd: Use a private inode for backing storage, Eric W. Biederman, (Fri Oct 19, 3:51 pm)
Re: [RFC][PATCH] block: Isolate the buffer cache in it's o ..., Eric W. Biederman, (Sat Oct 20, 9:53 pm)
Re: [PATCH] rd: Use a private inode for backing storage, Eric W. Biederman, (Sat Oct 20, 10:10 pm)
Re: [PATCH] rd: Use a private inode for backing storage, Nick Piggin, (Sat Oct 20, 10:24 pm)
Re: [PATCH] rd: Use a private inode for backing storage, Eric W. Biederman, (Sat Oct 20, 11:48 pm)
Re: [RFC][PATCH] block: Isolate the buffer cache in it's o ..., Eric W. Biederman, (Sun Oct 21, 12:09 am)
Re: [PATCH] rd: Use a private inode for backing storage, Christian Borntraeger, (Sun Oct 21, 12:28 am)
Re: [PATCH] rd: Use a private inode for backing storage, Eric W. Biederman, (Sun Oct 21, 1:23 am)
Re: [PATCH] rd: Use a private inode for backing storage, Eric W. Biederman, (Sun Oct 21, 10:56 am)
Re: [PATCH] rd: Use a private inode for backing storage, Eric W. Biederman, (Sun Oct 21, 11:39 am)