Re: [RFC 4/8] Enhance fallback functions in libs to support higher order pages

2007-04-24 Thread Matt Mackall
On Fri, Apr 20, 2007 at 12:10:43PM -0700, Christoph Lameter wrote: > On Fri, 20 Apr 2007, Dave Kleikamp wrote: > > > On Fri, 2007-04-20 at 12:05 +0100, Mel Gorman wrote: > > > > > comments about missing page_cache_size() covered elsewhere. However, I > > > note that Dave Kleikamp might be

Re: [RFC 4/8] Enhance fallback functions in libs to support higher order pages

2007-04-24 Thread Matt Mackall
On Fri, Apr 20, 2007 at 12:10:43PM -0700, Christoph Lameter wrote: On Fri, 20 Apr 2007, Dave Kleikamp wrote: On Fri, 2007-04-20 at 12:05 +0100, Mel Gorman wrote: comments about missing page_cache_size() covered elsewhere. However, I note that Dave Kleikamp might be interested in this

Re: [RFC 4/8] Enhance fallback functions in libs to support higher order pages

2007-04-20 Thread Dave Kleikamp
On Fri, 2007-04-20 at 12:10 -0700, Christoph Lameter wrote: > On Fri, 20 Apr 2007, Dave Kleikamp wrote: > > Yeah. I'm working on patches for storing file tails in buffers > > allocated from the slab cache, and the tail will be represented by a > > fake struct page. (This is primarily for kernels

Re: [RFC 4/8] Enhance fallback functions in libs to support higher order pages

2007-04-20 Thread Christoph Lameter
On Fri, 20 Apr 2007, Dave Kleikamp wrote: > On Fri, 2007-04-20 at 12:05 +0100, Mel Gorman wrote: > > > comments about missing page_cache_size() covered elsewhere. However, I > > note that Dave Kleikamp might be interested in this changing of > > page_cache_size() from the perspective of page

Re: [RFC 4/8] Enhance fallback functions in libs to support higher order pages

2007-04-20 Thread Dave Kleikamp
On Fri, 2007-04-20 at 12:05 +0100, Mel Gorman wrote: > comments about missing page_cache_size() covered elsewhere. However, I > note that Dave Kleikamp might be interested in this changing of > page_cache_size() from the perspective of page cache tails. I've added > him to the cc so he can take a

Re: [RFC 4/8] Enhance fallback functions in libs to support higher order pages

2007-04-20 Thread Jens Axboe
On Fri, Apr 20 2007, Christoph Lameter wrote: > On Fri, 20 Apr 2007, Jens Axboe wrote: > > > This works fine as long as you are in the submitter context, but once > > you pass the into the block layer, we don't have any way to find the > > address space (at least we don't want to). Would

Re: [RFC 4/8] Enhance fallback functions in libs to support higher order pages

2007-04-20 Thread Christoph Lameter
On Fri, 20 Apr 2007, Jens Axboe wrote: > This works fine as long as you are in the submitter context, but once > you pass the into the block layer, we don't have any way to find the > address space (at least we don't want to). Would something like this be > workable, name withstanding: > >

Re: [RFC 4/8] Enhance fallback functions in libs to support higher order pages

2007-04-20 Thread Mel Gorman
On (19/04/07 09:35), Christoph Lameter didst pronounce: > Variable Order Page Cache: Fixup fallback functions > > Fixup the fallback function in fs/libfs.c to be able to handle > higher order page cache pages. > > Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]> > > --- > fs/libfs.c | 16

Re: [RFC 4/8] Enhance fallback functions in libs to support higher order pages

2007-04-20 Thread Jens Axboe
On Thu, Apr 19 2007, Christoph Lameter wrote: > +static inline int page_cache_shift(struct address_space *a) > +{ > + return a->order + PAGE_CACHE_SHIFT; > +} > + > +static inline unsigned long page_cache_size(struct address_space *a) > +{ > + return PAGE_CACHE_SIZE << a->order; > +} This

Re: [RFC 4/8] Enhance fallback functions in libs to support higher order pages

2007-04-20 Thread Jens Axboe
On Thu, Apr 19 2007, Christoph Lameter wrote: +static inline int page_cache_shift(struct address_space *a) +{ + return a-order + PAGE_CACHE_SHIFT; +} + +static inline unsigned long page_cache_size(struct address_space *a) +{ + return PAGE_CACHE_SIZE a-order; +} This works fine

Re: [RFC 4/8] Enhance fallback functions in libs to support higher order pages

2007-04-20 Thread Mel Gorman
On (19/04/07 09:35), Christoph Lameter didst pronounce: Variable Order Page Cache: Fixup fallback functions Fixup the fallback function in fs/libfs.c to be able to handle higher order page cache pages. Signed-off-by: Christoph Lameter [EMAIL PROTECTED] --- fs/libfs.c | 16

Re: [RFC 4/8] Enhance fallback functions in libs to support higher order pages

2007-04-20 Thread Christoph Lameter
On Fri, 20 Apr 2007, Jens Axboe wrote: This works fine as long as you are in the submitter context, but once you pass the into the block layer, we don't have any way to find the address space (at least we don't want to). Would something like this be workable, name withstanding: static

Re: [RFC 4/8] Enhance fallback functions in libs to support higher order pages

2007-04-20 Thread Jens Axboe
On Fri, Apr 20 2007, Christoph Lameter wrote: On Fri, 20 Apr 2007, Jens Axboe wrote: This works fine as long as you are in the submitter context, but once you pass the into the block layer, we don't have any way to find the address space (at least we don't want to). Would something like

Re: [RFC 4/8] Enhance fallback functions in libs to support higher order pages

2007-04-20 Thread Dave Kleikamp
On Fri, 2007-04-20 at 12:05 +0100, Mel Gorman wrote: comments about missing page_cache_size() covered elsewhere. However, I note that Dave Kleikamp might be interested in this changing of page_cache_size() from the perspective of page cache tails. I've added him to the cc so he can take a

Re: [RFC 4/8] Enhance fallback functions in libs to support higher order pages

2007-04-20 Thread Christoph Lameter
On Fri, 20 Apr 2007, Dave Kleikamp wrote: On Fri, 2007-04-20 at 12:05 +0100, Mel Gorman wrote: comments about missing page_cache_size() covered elsewhere. However, I note that Dave Kleikamp might be interested in this changing of page_cache_size() from the perspective of page cache

Re: [RFC 4/8] Enhance fallback functions in libs to support higher order pages

2007-04-20 Thread Dave Kleikamp
On Fri, 2007-04-20 at 12:10 -0700, Christoph Lameter wrote: On Fri, 20 Apr 2007, Dave Kleikamp wrote: Yeah. I'm working on patches for storing file tails in buffers allocated from the slab cache, and the tail will be represented by a fake struct page. (This is primarily for kernels with a

Re: [RFC 4/8] Enhance fallback functions in libs to support higher order pages

2007-04-19 Thread Christoph Lameter
On Fri, 20 Apr 2007, David Chinner wrote: > I think PAGE_CACHE_SIZE is a redundant define with these > modifications. The page cache size in now variable and it is based > on a multiple of PAGE_SIZE. Hence I suggest that PAGE_CACHE_SIZE and > it's derivitives should be made to go away completely

Re: [RFC 4/8] Enhance fallback functions in libs to support higher order pages

2007-04-19 Thread David Chinner
On Thu, Apr 19, 2007 at 12:10:34PM -0700, Christoph Lameter wrote: > Variable Order Page Cache: Add functions to establish sizes > > We use the macros PAGE_CACHE_SIZE PAGE_CACHE_SHIFT PAGE_CACHE_MASK > and PAGE_CACHE_ALIGN in various places in the kernel. These are now > the base page size but we

Re: [RFC 4/8] Enhance fallback functions in libs to support higher order pages

2007-04-19 Thread Christoph Lameter
On Thu, 19 Apr 2007, Adam Litke wrote: > On 4/19/07, Christoph Lameter <[EMAIL PROTECTED]> wrote: > > @@ -331,11 +331,15 @@ int simple_prepare_write(struct file *fi > > unsigned from, unsigned to) > > { > > if (!PageUptodate(page)) { > > - if (to -

Re: [RFC 4/8] Enhance fallback functions in libs to support higher order pages

2007-04-19 Thread Adam Litke
On 4/19/07, Christoph Lameter <[EMAIL PROTECTED]> wrote: @@ -331,11 +331,15 @@ int simple_prepare_write(struct file *fi unsigned from, unsigned to) { if (!PageUptodate(page)) { - if (to - from != PAGE_CACHE_SIZE) { + if (to - from !=

[RFC 4/8] Enhance fallback functions in libs to support higher order pages

2007-04-19 Thread Christoph Lameter
Variable Order Page Cache: Fixup fallback functions Fixup the fallback function in fs/libfs.c to be able to handle higher order page cache pages. Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]> --- fs/libfs.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-)

[RFC 4/8] Enhance fallback functions in libs to support higher order pages

2007-04-19 Thread Christoph Lameter
Variable Order Page Cache: Fixup fallback functions Fixup the fallback function in fs/libfs.c to be able to handle higher order page cache pages. Signed-off-by: Christoph Lameter [EMAIL PROTECTED] --- fs/libfs.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) Index:

Re: [RFC 4/8] Enhance fallback functions in libs to support higher order pages

2007-04-19 Thread Adam Litke
On 4/19/07, Christoph Lameter [EMAIL PROTECTED] wrote: @@ -331,11 +331,15 @@ int simple_prepare_write(struct file *fi unsigned from, unsigned to) { if (!PageUptodate(page)) { - if (to - from != PAGE_CACHE_SIZE) { + if (to - from !=

Re: [RFC 4/8] Enhance fallback functions in libs to support higher order pages

2007-04-19 Thread Christoph Lameter
On Thu, 19 Apr 2007, Adam Litke wrote: On 4/19/07, Christoph Lameter [EMAIL PROTECTED] wrote: @@ -331,11 +331,15 @@ int simple_prepare_write(struct file *fi unsigned from, unsigned to) { if (!PageUptodate(page)) { - if (to - from !=

Re: [RFC 4/8] Enhance fallback functions in libs to support higher order pages

2007-04-19 Thread David Chinner
On Thu, Apr 19, 2007 at 12:10:34PM -0700, Christoph Lameter wrote: Variable Order Page Cache: Add functions to establish sizes We use the macros PAGE_CACHE_SIZE PAGE_CACHE_SHIFT PAGE_CACHE_MASK and PAGE_CACHE_ALIGN in various places in the kernel. These are now the base page size but we do

Re: [RFC 4/8] Enhance fallback functions in libs to support higher order pages

2007-04-19 Thread Christoph Lameter
On Fri, 20 Apr 2007, David Chinner wrote: I think PAGE_CACHE_SIZE is a redundant define with these modifications. The page cache size in now variable and it is based on a multiple of PAGE_SIZE. Hence I suggest that PAGE_CACHE_SIZE and it's derivitives should be made to go away completely