lkml.org 
[lkml]   [2009]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] mm: make VM_MAX_READAHEAD configurable
On Fri, Oct 09 2009, Andrew Morton wrote:
> On Fri, 9 Oct 2009 14:29:52 +0200
> Jens Axboe <jens.axboe@oracle.com> wrote:
>
> > On Fri, Oct 09 2009, Peter Zijlstra wrote:
> > > On Fri, 2009-10-09 at 13:19 +0200, Ehrhardt Christian wrote:
> > > > From: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
> > > >
> > > > On one hand the define VM_MAX_READAHEAD in include/linux/mm.h is just a default
> > > > and can be configured per block device queue.
> > > > On the other hand a lot of admins do not use it, therefore it is reasonable to
> > > > set a wise default.
> > > >
> > > > This path allows to configure the value via Kconfig mechanisms and therefore
> > > > allow the assignment of different defaults dependent on other Kconfig symbols.
> > > >
> > > > Using this, the patch increases the default max readahead for s390 improving
> > > > sequential throughput in a lot of scenarios with almost no drawbacks (only
> > > > theoretical workloads with a lot concurrent sequential read patterns on a very
> > > > low memory system suffer due to page cache trashing as expected).
> > >
> > > Why can't this be solved in userspace?
> > >
> > > Also, can't we simply raise this number if appropriate? Wu did some
> > > read-ahead trashing detection bits a long while back which should scale
> > > the read-ahead window back when we're low on memory, not sure that ever
> > > made it in, but that sounds like a better option than having different
> > > magic numbers for each platform.
> >
> > Agree, making this a config option (and even defaulting to a different
> > number because of an arch setting) is crazy.
>
> Given the (increasing) level of disparity between different kinds of
> storage devices, having _any_ default is crazy.

You have to start somewhere :-). 0 is a default, too.

> Would be better to make some sort of vaguely informed guess at
> runtime, based upon the characteristics of the device.

I'm pretty sure the readahead logic already does respond to eg memory
pressure, not sure if it attempts to do anything based on how quickly
the device is doing IO. Wu?

--
Jens Axboe



\
 
 \ /
  Last update: 2009-10-10 12:59    [W:0.069 / U:0.956 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site