10 Sep, 2005

1 commit


09 Sep, 2005

5 commits

  • 29 July 2005, Cambridge, MA:

    This afternoon Alan Stern submitted a patch to remove the URB_ASYNC_UNLINK
    flag from the Linux kernel. Mr. Stern explained, "This flag is a relic
    from an earlier, less-well-designed system. For over a year it hasn't
    been used for anything other than printing warning messages."

    An anonymous spokesman for the Linux kernel development community
    commented, "This is exactly the sort of thing we see happening all the
    time. As the kernel evolves, support for old techniques and old code can
    be jettisoned and replaced by newer, better approaches. Proprietary
    operating systems do not have the freedom or flexibility to change so
    quickly."

    Mr. Stern, a staff member at Harvard University's Rowland Institute who
    works on Linux only as a hobby, noted that the patch (labelled as548) did
    not update two files, keyspan.c and option.c, in the USB drivers' "serial"
    subdirectory. "Those files need more extensive changes," he remarked.
    "They examine the status field of several URBs at times when they're not
    supposed to. That will need to be fixed before the URB_ASYNC_UNLINK flag
    is removed."

    Greg Kroah-Hartman, the kernel maintainer responsible for overseeing all
    of Linux's USB drivers, did not respond to our inquiries or return our
    calls. His only comment was "Applied, thanks."

    Signed-off-by: Alan Stern
    Signed-off-by: Greg Kroah-Hartman

    Alan Stern
     
  • Back out Axboe-style quasi-S/G and replace it with one command and
    repeated URBs. This is similar to what usb-storage does, only instead
    of a few URBs allocated together, one URB is reused.

    Jens's idea was very nice, but it collapsed when I had to support
    packet commads for CD burning. I cannot issue two or more packet
    commands where application expected only one.

    However, burning does not work completely yet. The cdrecord starts,
    recognizes the device, then aborts without writing a TOC.

    Signed-off-by: Pete Zaitcev
    Signed-off-by: Greg Kroah-Hartman

    Pete Zaitcev
     
  • When Al Viro saw the ub.c, he observed that it was a proof positive of
    Linus not reading patches anymore: names like fo_ob_ar_ba_2 used to
    cause serious fireworks. In my defence, any good scheme can be pushed
    to the realm of absurd if pushed far enough.

    Signed-off-by: Pete Zaitcev
    Signed-off-by: Greg Kroah-Hartman

    Pete Zaitcev
     
  • Evidently, Yani Ioannou's display is wider than mine.

    Signed-off-by: Pete Zaitcev
    Signed-off-by: Greg Kroah-Hartman

    Pete Zaitcev
     
  • This the quasi-S/G patch for ub as suggested by Jens Axboe at OLS and
    implemented that night before 4 a.m. Surprisingly, it worked right away...
    Alas, I had to skip some OLS partying, but it was for the good cause.
    Now the speed of ub is quite acceptable even on partitions with small
    block size.

    The ub does not really support S/G. Instead, it just tells the block
    layer that it does. Then, most of the time, the block layer merges
    requests and passes single-segmnent requests down to ub; everything
    works as before. Very rarely ub gets an unmerged S/G request. In such
    case, it issues several commands to the device.

    I added a small array of counters to monitor the merging (sg_stat).
    This may be dropped later.

    Signed-off-by: Pete Zaitcev
    Signed-off-by: Greg Kroah-Hartman

    Pete Zaitcev
     

08 Sep, 2005

7 commits

  • Linus Torvalds
     
  • Sanitized and fixed floppy dependencies: split the messy dependencies for
    BLK_DEV_FD by introducing a new symbol (ARCH_MAY_HAVE_PC_FDC), making
    BLK_DEV_FD depend on that one and taking declarations of ARCH_MAY_HAVE_PC_FDC
    to arch/*/Kconfig. While we are at it, fixed several obvious cases when
    BLK_DEV_FD should have been excluded (architectures lacking asm/floppy.h
    are *not* going to have floppy.c compile, let alone work).

    If you can come up with better name for that ("this architecture might
    have working PC-compatible floppy disk controller"), you are more than
    welcome - just s/ARCH_MAY_HAVE_PC_FDC/your_prefered_name/g in the patch
    below...

    Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    viro@ZenIV.linux.org.uk
     
  • This patch converts kcalloc(1, ...) calls to use the new kzalloc() function.

    Signed-off-by: Pekka Enberg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pekka Enberg
     
  • I ran across a memory leak related to the cfq scheduler. The cfq
    init function increments the refcnt of the associated request_queue.

    This refcount gets decremented in cfq's exit function. Since blk_cleanup_queue
    only calls the elevator exit function when its refcnt goes to zero, the
    request_q never gets cleaned up. It didn't look like other io schedulers were
    incrementing this refcnt, so I removed the refcnt increment and it fixed the
    memory leak for me.

    To reproduce the problem, simply use cfq and use the scsi_host scan sysfs
    attribute to scan "- - -" repeatedly on a scsi host and watch the memory
    vanish.

    Signed-off-by: Brian King
    Acked-by: Jens Axboe
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Brian King
     
  • Per-queue parameters should be updated using the appropriate blk_queue_xxx
    functions.

    Signed-off-by: Stuart McLaren
    Cc: Jens Axboe
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stuart McLaren
     
  • Patch to clean up missing overflow check in get_blkdev_list. The printf
    which adds the "Block Devices" string in /proc/devices can overflow the
    presented page if get_chrdev_list eats up the entire 4k space.

    Signed-off-by: Neil Horman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Neil Horman
     
  • cleanup of deadline_dispatch_requests():

    - replace drq selection with hopefully clearer while semantically the
    same construct: take write request, if there is any, otherwise take read
    one, or NULL if none exist.

    - kill unused other_dir.

    Signed-off-by: Nikita Danilov
    Cc: Jens Axboe
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nikita Danilov
     

06 Sep, 2005

3 commits


05 Sep, 2005

2 commits


02 Sep, 2005

1 commit


30 Aug, 2005

3 commits


28 Aug, 2005

1 commit


25 Aug, 2005

1 commit

  • One critical fix and two minor fixes for 2.6.13-rc7:

    - Max depth must currently be 2 to allow barriers to function on SCSI
    - Prefer sync request over async in choosing the next request
    - Never allow async request to preempt or disturb the "anticipation" for
    a single cfq process context. This is as-designed, the code right now
    is buggy in that area.

    Signed-off-by: Jens Axboe
    Signed-off-by: Linus Torvalds

    Jens Axboe
     

11 Aug, 2005

1 commit


06 Aug, 2005

1 commit

  • My patch in commit fa72b903f75e4f0f0b2c2feed093005167da4023 incorrectly
    removed blk_queue_tag->real_max_depth.

    The original resize implementation was incorrect in the following
    points.

    * actual allocation size of tag_index was shorter than real_max_size,
    but assumed to be of the same size, possibly causing memory access
    beyond the allocated area.
    * bits in tag_map between max_deptn and real_max_depth were
    initialized to 1's, making the tags permanently reserved.

    In an attempt to fix above two bugs, I had removed allocation optimization
    in init_tag_map and real_max_size. Tag map/index were allocated and freed
    immediately during resize.

    Unfortunately, I wasn't considering that tag map/index can be resized
    dynamically with tags beyond new_depth active. This led to accessing
    freed area after shrinking tags and led to the following bug reporting
    thread on linux-scsi.

    http://marc.theaimsgroup.com/?l=linux-scsi&m=112319898111885&w=2

    To fix the problem, I've revived real_max_depth without allocation
    optimization in init_tag_map, and Andrew Vasquez confirmed that the
    problem was fixed. As Jens is not going to be available for a week, he
    asked me to make sure that this patch reaches you.

    http://marc.theaimsgroup.com/?l=linux-scsi&m=112325778530886&w=2

    Also, a comment was added to make sure that real_max_size is needed for
    dynamic shrinking.

    Signed-off-by: Tejun Heo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tejun Heo
     

03 Aug, 2005

1 commit

  • CFQ will currently stall when using write barriers and the default
    max_depth setting of 1, since we artificially need a depth of 2 when
    pre-pending the first flush. So never deny the barrier request going to
    the device.

    This is a regression since 2.6.12, it was found in SUSE testing.

    Signed-off-by: Jens Axboe
    Signed-off-by: Linus Torvalds

    Jens Axboe
     

28 Jul, 2005

4 commits

  • This patch adds per disk queue functionality to cciss. Sometime back I
    submitted a patch but it looks like only part of what I needed. In the 2.6
    kernel if we have more than one logical volume the driver will Oops during
    rmmod. It seems all of the queues actually point back to the same queue.
    So after deleting the first volume you hit a null pointer on the second
    one.

    This has been tested in our labs. There is no difference in performance,
    it just fixes the Oops.

    Signed-off-by: Mike Miller
    Cc: Jens Axboe
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Miller
     
  • turn many #if $undefined_string into #ifdef $undefined_string to fix some
    warnings after -Wno-def was added to global CFLAGS

    Signed-off-by: Olaf Hering
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Olaf Hering
     
  • This patch fixes a microcode lockup in my CD-ROM adapters when a blank CD
    is inserted. However, do not try to burn CDs yet! I'm pretty sure that
    trying it will end in coasters.

    - Fix a few cases where we were unable to resynchronize with replies
    for previous commands. The main thing is to keep reading replies
    in case of a stall. This is done with the new state CLRRS.
    - Since I am forgetting the basic state machine already, document it.
    - Move counter increments in the looping path in its own function.
    - Fix a harmless buglet in case CSW read fails to submit: do not
    override state.
    - Implement the Alan Stern's idea for adaptive signature checking.

    Signed-off-by: Pete Zaitcev
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pete Zaitcev
     
  • AS is doing internal msecjiffies conversions twice, so the sysfs tunables
    which represent time are coming out wrong. The switch from HZ=1000 exposed
    this.

    Cc: Nick Piggin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jens Axboe
     

29 Jun, 2005

6 commits

  • get_request is now expected to be holding on to queue_lock, with interrupts
    disabled, when it returns NULL; but one path forgot that, causing all kinds
    of nastiness under swap load - badness backtraces, strange failures, BUGs.

    Signed-off-by: Hugh Dickins
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     
  • get_io_context needlessly turned off interrupts and checked for racing io
    context creations. Both of which aren't needed, because the io context can
    only be created while in process context of the current process.

    Also, split the function in 2. A light version, current_io_context does not
    elevate the reference count specifically, but can be used when in process
    context, because the process holds a reference itself.

    Signed-off-by: Nick Piggin
    Cc: Jens Axboe
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin
     
  • Change around locking a bit for a result of 1-2 less spin lock unlock pairs in
    request submission paths.

    Signed-off-by: Nick Piggin
    Cc: Jens Axboe
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin
     
  • In the case where the request is not able to be merged by the elevator, don't
    retake the lock and retry the merge mechanism after allocating a new request.

    Instead assume that the chance of a merge remains slim, and now that we've
    done most of the work allocating a request we may as well just go with it.

    Also be rid of the GFP_ATOMIC allocation: we've got working mempools for the
    block layer now, so let's save atomic memory for things like networking.

    Lastly, in get_request_wait, do an initial get_request call before going into
    the waitqueue. This is reported to help efficiency.

    Signed-off-by: Nick Piggin
    Cc: Jens Axboe
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin
     
  • Currently we cap request allocations at q->nr_requests, but we allow a
    batching io context to allocate up to 32 more (default setting). This
    can flood the queue with request allocations, with only a few batching
    processes. The real fix would be to limit the number of batchers, but
    as that isn't currently tracked, I suggest we just cap the maximum
    number of allocated requests to eg 50% over the limit.

    This was observed in real life, users typically see this as vmstat bo
    numbers going off the wall with seconds of no queueing afterwards.
    Behaviour this bursty is not beneficial.

    Signed-off-by: Jens Axboe
    Signed-off-by: Linus Torvalds

    Jens Axboe
     
  • Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

28 Jun, 2005

3 commits

  • drivers/block/cfq-iosched.c: In function 'cfq_put_queue':
    drivers/block/cfq-iosched.c:303: sorry, unimplemented: inlining failed in call to 'cfq_pending_requests': function body not available
    drivers/block/cfq-iosched.c:1080: sorry, unimplemented: called from here
    drivers/block/cfq-iosched.c: In function '__cfq_may_queue':
    drivers/block/cfq-iosched.c:1955: warning: the address of 'cfq_cfqq_must_alloc_slice', will always evaluate as 'true'
    make[1]: *** [drivers/block/cfq-iosched.o] Error 1
    make: *** [drivers/block/cfq-iosched.o] Error 2

    Cc: Jeff Garzik
    Cc: Jens Axboe
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • This patch fulfills a promise I made to Christoph sometime back. I am
    removing the partition info from the CCISS_GETLUNINFO ioctl as I was informed
    my "driver had no damn business reading that structure." ;)

    The application folks are to use /proc or /sys for partition info from now on.
    I am only aware of a few apps that use this ioctl and I'm not sure they ever
    used the partition info.

    Signed-off-by: Mike Miller
    Acked-by: Jeff Garzik
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Miller
     
  • This is pass 2 of my patch to add pci domain info to an existing ioctl. This
    time I insert the domain between dev_fn and board_id as Willy suggested and
    change the var to unsigned short to ease Christoph's concerns. Although I
    thought unsigned int was the correct var type for this. I also thought it
    didn't matter where I inserted it in the structure.

    Signed-off-by: Mike Miller
    Acked-by: Jeff Garzik
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Miller