lkml.org 
[lkml]   [2011]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 2/8] readahead: make default readahead size a kernel parameter
    On Mon, Nov 21, 2011 at 06:01:37PM +0800, Christoph Hellwig wrote:
    > On Mon, Nov 21, 2011 at 05:18:21PM +0800, Wu Fengguang wrote:
    > > From: Nikanth Karthikesan <knikanth@suse.de>
    > >
    > > Add new kernel parameter "readahead=", which allows user to override
    > > the static VM_MAX_READAHEAD=128kb.
    >
    > Is a boot-time paramter really such a good idea? I would at least

    It's most convenient to set at boot time, because the default size
    will be used to initialize all the block devices.

    > make it a sysctl so that it's run-time controllable, including
    > beeing able to set it from initscripts.

    Once boot up, it's more natural to set the size one by one, for
    example

    blockdev --setra 1024 /dev/sda2
    or
    echo 512 > /sys/block/sda/queue/read_ahead_kb

    And you still have the chance to modify the global default, but the
    change will only be inherited by newly created devices thereafter:

    echo 512 > /sys/devices/virtual/bdi/default/read_ahead_kb

    The above command is very suitable for use in initscripts. However
    there are no natural way to do sysctl as there is no such a global
    value.

    Thanks,
    Fengguang


    \
     
     \ /
      Last update: 2011-11-21 12:37    [W:4.068 / U:0.200 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site