Re: [patch] rewrite rd

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Nick Piggin
Date: Tuesday, December 4, 2007 - 12:01 am

On Mon, Dec 03, 2007 at 10:29:03PM -0800, Andrew Morton wrote:

Same thing I guess -- it will use more memory in the common case, but should
actually be able to reclaim slightly more memory under pressure, so the
tiny systems guys shouldn't have too much trouble.

And we're avoiding the whole class of aliasing problems where mmap on
the old rd driver means that you're creating new mappings to your backing
store pages.

 

Ah yep, there is the highmem advantage too.



Or 7th, depend on how you count ;) I always thought redefining it is a
prerequsite to getting anything merged into the block layer, so I'm too
scared to put it in include/linux/blkdev.h ;)



I guess it is. Although on one hand the radix-tree uses unsigned long, but
on the other hand, page->index is pgoff.


I guess it has similar issues to rd.c -- we can't risk recursing
into the block layer here. However unlike rd.c, we _could_ easily
add some mode or ioctl to allocate the backing store upfront, with
full reclaim flags...

 

AFAIK that only applies to pagecache but I haven't been paying much
attention to that stuff lately. It wouldn't be hard to move these
pages around, if we had a hook from the vm for it.
 


Good memory, but it's the low level leaf traversal that bales out at
boundaries. The higher level code then retries, so we should be OK
here.


I guess the API is using size_t, so that would be the more approprite type
to convert to. And I'll use min_t too.



The brd backing store never gets any userspace aliases, so I think it should
be OK when copying into it.

 

Copying into the pagecache yes needs to flush I think. Although strictly it
also needs a write barrier to prevent these stores being passed by the store
to set PG_uptodate (but that's another story, which I think should be fixed
in the PageUptodate macros rather than device drivers and filesystems...)

 
Yeah, another thread could do that...



I was thinking also that perhaps the buffer cache layer could intercept
the ioctl on the way through and flush the buffer cache before going to
the device -- so device drivers don't have to have _any_ knowledge
about the buffer cache...?

Thanks for the review, I'll post an incremental patch in a sec.

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

Messages in current thread:
[patch] rewrite rd, Nick Piggin, (Mon Dec 3, 9:26 pm)
Re: [patch] rewrite rd, Andrew Morton, (Mon Dec 3, 11:29 pm)
Re: [patch] rewrite rd, Nick Piggin, (Tue Dec 4, 12:01 am)
Re: [patch] rewrite rd, Nick Piggin, (Tue Dec 4, 12:08 am)
Re: [patch] rewrite rd, Rob Landley, (Tue Dec 4, 12:55 am)
Re: [patch] rewrite rd, Nick Piggin, (Tue Dec 4, 2:29 am)
Re: [patch] rewrite rd, Christian Borntraeger, (Tue Dec 4, 2:54 am)
Re: [patch] rewrite rd, Nick Piggin, (Tue Dec 4, 3:10 am)
[patch] rd: support XIP, Nick Piggin, (Tue Dec 4, 4:21 am)
[patch] ext2: xip check fix, Nick Piggin, (Tue Dec 4, 4:23 am)
Re: [patch] rd: support XIP, Andrew Morton, (Tue Dec 4, 4:26 am)
Re: [patch] rd: support XIP, Nick Piggin, (Tue Dec 4, 4:35 am)
Re: [patch] rd: support XIP, Duane Griffin, (Tue Dec 4, 5:06 am)
[patch] mm: fix XIP file writes, Nick Piggin, (Tue Dec 4, 6:00 am)
[patch] rd: support XIP (updated), Nick Piggin, (Tue Dec 4, 6:03 am)
Re: [patch] rewrite rd, Rob Landley, (Tue Dec 4, 12:53 pm)
Re: [patch] ext2: xip check fix, Carsten Otte, (Wed Dec 5, 8:43 am)
Re: [patch] ext2: xip check fix, Nick Piggin, (Wed Dec 5, 4:33 pm)
Re: [patch] ext2: xip check fix, Carsten Otte, (Thu Dec 6, 1:43 am)
Re: [patch] ext2: xip check fix, Nick Piggin, (Thu Dec 6, 1:52 am)
Re: [patch] ext2: xip check fix, Carsten Otte, (Thu Dec 6, 2:59 am)
Re: [patch] ext2: xip check fix, Nick Piggin, (Thu Dec 6, 3:18 am)
Re: [patch] ext2: xip check fix, Carsten Otte, (Thu Dec 6, 3:24 am)
Re: [patch] ext2: xip check fix, Rob Landley, (Thu Dec 6, 11:11 am)
Re: [patch] ext2: xip check fix, Jared Hulbert, (Thu Dec 6, 8:22 pm)
Re: [patch] ext2: xip check fix, Rob Landley, (Thu Dec 6, 9:17 pm)
Re: [patch] ext2: xip check fix, Nick Piggin, (Thu Dec 6, 9:23 pm)
Re: [patch] ext2: xip check fix, Jared Hulbert, (Thu Dec 6, 9:40 pm)
Re: [patch] ext2: xip check fix, Carsten Otte, (Fri Dec 7, 1:59 am)
Re: [patch] ext2: xip check fix, Jared Hulbert, (Fri Dec 7, 2:52 am)
Re: [patch] mm: fix XIP file writes, Christian Borntraeger, (Mon Dec 10, 7:38 am)
Re: [patch] mm: fix XIP file writes, Nick Piggin, (Tue Dec 11, 9:03 pm)
Re: [patch] rewrite rd, Matthew Wilcox, (Mon Jan 14, 9:47 am)
Re: [patch] rewrite rd, Jens Axboe, (Mon Jan 14, 10:21 am)