04 Mar, 2014

1 commit

  • [ 365.164040] BUG: sleeping function called from invalid context at kernel/rtmutex.c:674
    [ 365.164041] in_atomic(): 1, irqs_disabled(): 1, pid: 26, name: migration/1
    [ 365.164043] no locks held by migration/1/26.
    [ 365.164044] irq event stamp: 6648
    [ 365.164056] hardirqs last enabled at (6647): [] restore_args+0x0/0x30
    [ 365.164062] hardirqs last disabled at (6648): [] multi_cpu_stop+0x9d/0x120
    [ 365.164070] softirqs last enabled at (0): [] copy_process.part.28+0x6fc/0x1920
    [ 365.164072] softirqs last disabled at (0): [< (null)>] (null)
    [ 365.164076] CPU: 1 PID: 26 Comm: migration/1 Tainted: GF N 3.12.12-rt19-0.gcb6c4a2-rt #3
    [ 365.164078] Hardware name: QCI QSSC-S4R/QSSC-S4R, BIOS QSSC-S4R.QCI.01.00.S013.032920111005 03/29/2011
    [ 365.164091] 0000000000000001 ffff880a42ea7c30 ffffffff815367e6 ffffffff81a086c0
    [ 365.164099] ffff880a42ea7c40 ffffffff8108919c ffff880a42ea7c60 ffffffff8153c24f
    [ 365.164107] ffff880a42ea91f0 00000000ffffffe1 ffff880a42ea7c88 ffffffff81297ec0
    [ 365.164108] Call Trace:
    [ 365.164119] [] try_stack_unwind+0x191/0x1a0
    [ 365.164127] [] dump_trace+0x92/0x360
    [ 365.164133] [] show_trace_log_lvl+0x48/0x60
    [ 365.164138] [] show_stack_log_lvl+0xd8/0x1d0
    [ 365.164143] [] show_stack+0x20/0x50
    [ 365.164153] [] dump_stack+0x54/0x9a
    [ 365.164163] [] __might_sleep+0xfc/0x140
    [ 365.164173] [] rt_spin_lock+0x1f/0x70
    [ 365.164182] [] blk_mq_main_cpu_notify+0x20/0x70
    [ 365.164191] [] notifier_call_chain+0x4c/0x70
    [ 365.164201] [] __raw_notifier_call_chain+0x9/0x10
    [ 365.164207] [] cpu_notify+0x1e/0x40
    [ 365.164217] [] take_cpu_down+0x22/0x40
    [ 365.164223] [] multi_cpu_stop+0xd6/0x120
    [ 365.164229] [] cpu_stopper_thread+0xd7/0x1e0
    [ 365.164235] [] smpboot_thread_fn+0x203/0x380
    [ 365.164241] [] kthread+0xc8/0xd0
    [ 365.164250] [] ret_from_fork+0x7c/0xb0
    [ 365.164429] smpboot: CPU 1 is now offline

    Signed-off-by: Mike Galbraith
    Signed-off-by: Jens Axboe

    Mike Galbraith
     

29 Jan, 2014

1 commit


09 Jan, 2014

1 commit

  • __smp_call_function_single already avoids multiple IPIs by internally
    queing up the items, and now also is available for non-SMP builds as
    a trivially correct stub, so there is no need to wrap it. If the
    additional lock roundtrip cause problems my patch to convert the
    generic IPI code to llists is waiting to get merged will fix it.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: Jens Axboe

    Christoph Hellwig
     

14 Nov, 2013

1 commit

  • The new blk-mq code added new instances of __cpuinit usage.
    We removed this a couple versions ago; we now want to remove
    the compat no-op stubs. Introducing new users is not what
    we want to see at this point in time, as it will break once
    the stubs are gone.

    Signed-off-by: Paul Gortmaker
    Signed-off-by: Jens Axboe

    Paul Gortmaker
     

25 Oct, 2013

1 commit

  • Linux currently has two models for block devices:

    - The classic request_fn based approach, where drivers use struct
    request units for IO. The block layer provides various helper
    functionalities to let drivers share code, things like tag
    management, timeout handling, queueing, etc.

    - The "stacked" approach, where a driver squeezes in between the
    block layer and IO submitter. Since this bypasses the IO stack,
    driver generally have to manage everything themselves.

    With drivers being written for new high IOPS devices, the classic
    request_fn based driver doesn't work well enough. The design dates
    back to when both SMP and high IOPS was rare. It has problems with
    scaling to bigger machines, and runs into scaling issues even on
    smaller machines when you have IOPS in the hundreds of thousands
    per device.

    The stacked approach is then most often selected as the model
    for the driver. But this means that everybody has to re-invent
    everything, and along with that we get all the problems again
    that the shared approach solved.

    This commit introduces blk-mq, block multi queue support. The
    design is centered around per-cpu queues for queueing IO, which
    then funnel down into x number of hardware submission queues.
    We might have a 1:1 mapping between the two, or it might be
    an N:M mapping. That all depends on what the hardware supports.

    blk-mq provides various helper functions, which include:

    - Scalable support for request tagging. Most devices need to
    be able to uniquely identify a request both in the driver and
    to the hardware. The tagging uses per-cpu caches for freed
    tags, to enable cache hot reuse.

    - Timeout handling without tracking request on a per-device
    basis. Basically the driver should be able to get a notification,
    if a request happens to fail.

    - Optional support for non 1:1 mappings between issue and
    submission queues. blk-mq can redirect IO completions to the
    desired location.

    - Support for per-request payloads. Drivers almost always need
    to associate a request structure with some driver private
    command structure. Drivers can tell blk-mq this at init time,
    and then any request handed to the driver will have the
    required size of memory associated with it.

    - Support for merging of IO, and plugging. The stacked model
    gets neither of these. Even for high IOPS devices, merging
    sequential IO reduces per-command overhead and thus
    increases bandwidth.

    For now, this is provided as a potential 3rd queueing model, with
    the hope being that, as it matures, it can replace both the classic
    and stacked model. That would get us back to having just 1 real
    model for block devices, leaving the stacked approach to dm/md
    devices (as it was originally intended).

    Contributions in this patch from the following people:

    Shaohua Li
    Alexander Gordeev
    Christoph Hellwig
    Mike Christie
    Matias Bjorling
    Jeff Moyer

    Acked-by: Christoph Hellwig
    Signed-off-by: Jens Axboe

    Jens Axboe