25 Jan, 2008

7 commits

  • Now that the old kobject_init() function is gone, rename
    kobject_init_ng() to kobject_init() to clean up the namespace.

    Cc: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • Now that the old kobject_add() function is gone, rename kobject_add_ng()
    to kobject_add() to clean up the namespace.

    Cc: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • This converts the code to use the new kobject functions, cleaning up the
    logic in doing so.

    Cc: Jens Axboe
    Cc: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • This converts the code to use the new kobject functions, cleaning up the
    logic in doing so.

    Cc: Jens Axboe
    Cc: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • This moves the block devices to /sys/class/block. It will create a
    flat list of all block devices, with the disks and partitions in one
    directory. For compatibility /sys/block is created and contains symlinks
    to the disks.

    /sys/class/block
    |-- sda -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda
    |-- sda1 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1
    |-- sda10 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda10
    |-- sda5 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda5
    |-- sda6 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda6
    |-- sda7 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda7
    |-- sda8 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda8
    |-- sda9 -> ../../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda9
    `-- sr0 -> ../../devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0/block/sr0

    /sys/block/
    |-- sda -> ../devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda
    `-- sr0 -> ../devices/pci0000:00/0000:00:1f.2/host1/target1:0:0/1:0:0:0/block/sr0

    Signed-off-by: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Kay Sievers
     
  • Dynamically create the kset instead of declaring it statically. We also
    rename block_subsys to block_kset to catch all users of this symbol
    with a build error instead of an easy-to-ignore build warning.

    Cc: Kay Sievers
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • We don't need a "default" ktype for a kset. We should set this
    explicitly every time for each kset. This change is needed so that we
    can make ksets dynamic, and cleans up one of the odd, undocumented
    assumption that the kset/kobject/ktype model has.

    This patch is based on a lot of help from Kay Sievers.

    Nasty bug in the block code was found by Dave Young

    Cc: Kay Sievers
    Cc: Dave Young
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

11 Jan, 2008

2 commits

  • It just inits the mutex, we can do that with DEFINE_MUTEX() instead.

    Signed-off-by: Jens Axboe

    Jens Axboe
     
  • David Dillow reported broken blktrace timestamps. The reason
    is cpu_clock() which is not a global time source.

    Fix bkltrace timestamps by using ktime_get() like the networking
    code does for packet timestamps. This also removes a whole lot
    of complexity from bkltrace.c and shrinks the code by 500 bytes:

    text data bss dec hex filename
    2888 124 44 3056 bf0 blktrace.o.before
    2390 116 44 2550 9f6 blktrace.o.after

    Signed-off-by: Ingo Molnar
    Signed-off-by: Jens Axboe

    Ingo Molnar
     

18 Dec, 2007

4 commits


27 Nov, 2007

3 commits

  • This was a temporary debugging thing for sg chaining testing, revert
    it now as it has served its purpose.

    This reverts commit 563063a808de6b2004d5b8a09ddcb6125481f4b2.

    Signed-off-by: Jens Axboe

    Jens Axboe
     
  • Fix a memory leak in alloc_disk_node(). Don't forget to free 'dkstats' when the allocation of 'part' failed.

    Signed-off-by: Jerome Marchand
    Signed-off-by: Jens Axboe

    Jerome Marchand
     
  • if blktrace program segfault it will not be able
    to call BLKTRACETEARDOWN. Now if we run the blktrace
    again that would result in a failure to create the
    block/ debugfs directory.This will result
    in blk_remove_root() to be called which will set
    blk_tree_root to NULL. But the debugfs block dir
    still exist because it contain subdirectory.

    Now if we try to fix it using BLKTRACETEARDOWN
    it won't work because blk_tree_root is NULL.

    Fix the same.

    Tested as below

    root@qemu-image:/home/kvaneesh/blktrace# ./blktrace -d /dev/hdc
    Segmentation fault
    root@qemu-image:/home/kvaneesh/blktrace# ./blktrace -d /dev/hdc
    BLKTRACESETUP: No such file or directory
    Failed to start trace on /dev/hdc
    root@qemu-image:/home/kvaneesh/blktrace# ./blktrace -k /dev/hdc
    root@qemu-image:/home/kvaneesh/blktrace# ./blktrace -d /dev/hdc

    Signed-off-by: Aneesh Kumar K.V
    Signed-off-by: Jens Axboe

    Aneesh Kumar K.V
     

09 Nov, 2007

2 commits

  • Added blk_unplug interface, allowing all invocations of unplugs to result
    in a generated blktrace UNPLUG.

    Signed-off-by: Alan D. Brunelle
    Signed-off-by: Jens Axboe

    Alan D. Brunelle
     
  • Credit goes to juergen.kadidlo@exasol.com for diagnosing this issue
    and supplying the initial patch.

    blk_queue_invalidate_tags() must use the proper requeueing paths instead
    of open coding the re-add of the request, otherwise we bug out in rq
    accounting. Just switch to using blk_requeue_request(), that takes care
    of end-tag handling as well and also adds the blktrace REQUEUE notify
    event that is also appropriate here.

    Signed-off-by: Jens Axboe

    Jens Axboe
     

07 Nov, 2007

3 commits

  • In theory, if the queue was idle long enough, cfq_idle_class_timer may have
    a false (and very long) timeout because jiffies can wrap into the past wrt
    ->last_end_request.

    Signed-off-by: Oleg Nesterov
    Signed-off-by: Jens Axboe

    Oleg Nesterov
     
  • After the fresh boot:

    ionice -c3 -p $$
    echo cfq >> /sys/block/XXX/queue/scheduler
    dd if=/dev/XXX of=/dev/null bs=512 count=1

    Now dd hangs in D state and the queue is completely stalled for approximately
    INITIAL_JIFFIES + CFQ_IDLE_GRACE jiffies. This is because cfq_init_queue()
    forgets to initialize cfq_data->last_end_request.

    (I guess this patch is not complete, overflow is still possible)

    Signed-off-by: Oleg Nesterov
    Signed-off-by: Jens Axboe

    Oleg Nesterov
     
  • Spotted by Nick , hopefully can explain the second trace in
    http://bugzilla.kernel.org/show_bug.cgi?id=9180.

    If ->async_idle_cfqq != NULL cfq_put_async_queues() puts it IOPRIO_BE_NR times
    in a loop. Fix this.

    Signed-off-by: Oleg Nesterov
    Signed-off-by: Jens Axboe

    Oleg Nesterov
     

04 Nov, 2007

1 commit


02 Nov, 2007

5 commits

  • Signed-off-by: Jens Axboe

    Jens Axboe
     
  • After switching data directions, deadline always starts the next batch
    from the lowest-sector request. This gives excessive deadline expiries
    and large latency and throughput disparity between high- and low-sector
    requests; an order of magnitude in some tests.

    This patch changes the batching behaviour so new batches start from the
    request whose expiry is earliest.

    Signed-off-by: Aaron Carroll
    Signed-off-by: Jens Axboe

    Aaron Carroll
     
  • The deadline I/O scheduler does not reset the batch count when starting
    a new batch at a higher-sectored request. This means the second and
    subsequent batch in the same data direction will never exceed a single
    request in size whenever higher-sectored requests are pending.

    This patch gives new batches in the same data direction as old ones
    their full quota of requests by resetting the batch count.

    Signed-off-by: Aaron Carroll
    Signed-off-by: Jens Axboe

    Aaron Carroll
     
  • Factor finding the next request in sector-sorted order into
    a function deadline_latter_request.

    Signed-off-by: Aaron Carroll
    Signed-off-by: Jens Axboe

    Aaron Carroll
     
  • sg_mark_end() overwrites the page_link information, but all users want
    __sg_mark_end() behaviour where we just set the end bit. That is the most
    natural way to use the sg list, since you'll fill it in and then mark the
    end point.

    So change sg_mark_end() to only set the termination bit. Add a sg_magic
    debug check as well, and clear a chain pointer if it is set.

    Signed-off-by: Jens Axboe

    Jens Axboe
     

29 Oct, 2007

7 commits


24 Oct, 2007

1 commit


23 Oct, 2007

3 commits


20 Oct, 2007

2 commits

  • Signed-off-by: Uwe Kleine-König
    Signed-off-by: Adrian Bunk

    Uwe Kleine-König
     
  • The task_struct->pid member is going to be deprecated, so start
    using the helpers (task_pid_nr/task_pid_vnr/task_pid_nr_ns) in
    the kernel.

    The first thing to start with is the pid, printed to dmesg - in
    this case we may safely use task_pid_nr(). Besides, printks produce
    more (much more) than a half of all the explicit pid usage.

    [akpm@linux-foundation.org: git-drm went and changed lots of stuff]
    Signed-off-by: Pavel Emelyanov
    Cc: Dave Airlie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pavel Emelyanov