1. 14 Feb, 2015 1 commit
  2. 22 Jan, 2015 1 commit
  3. 20 Jan, 2015 1 commit
    • Sasha Levin's avatar
      scsi_debug: use atomic allocation in resp_rsup_opcodes · 99531e60
      Sasha Levin authored
      
      
      resp_rsup_opcodes() may get called from atomic context and would need to
      use GFP_ATOMIC for allocations:
      
      [ 1237.913419] BUG: sleeping function called from invalid context at mm/slub.c:1262
      [ 1237.914865] in_atomic(): 1, irqs_disabled(): 0, pid: 7556, name: trinity-c311
      [ 1237.916142] 3 locks held by trinity-c311/7556:
      [ 1237.916981] #0: (sb_writers#5){.+.+.+}, at: do_readv_writev (include/linux/fs.h:2346 fs/read_write.c:844)
      [ 1237.919713] #1: (&of->mutex){+.+.+.}, at: kernfs_fop_write (fs/kernfs/file.c:297)
      [ 1237.922626] Mutex: counter: -1 owner: trinity-c311
      [ 1237.924044] #2: (s_active#51){.+.+.+}, at: kernfs_fop_write (fs/kernfs/file.c:297)
      [ 1237.925960] Preemption disabled blk_execute_rq_nowait (block/blk-exec.c:95)
      [ 1237.927416]
      [ 1237.927680] CPU: 24 PID: 7556 Comm: trinity-c311 Not tainted 3.19.0-rc4-next-20150116-sasha-00054-g4ad498c-dirty #1744
      [ 1237.929603]  ffff8804fc9d8000 ffff8804d9bc3548 ffffffff9d439fb2 0000000000000000
      [ 1237.931097]  0000000000000000 ffff8804d9bc3588 ffffffff9a18389a ffff8804d9bc3598
      [ 1237.932466]  ffffffff9a1b1715 ffffffffa15935d8 ffffffff9e6f8cb1 00000000000004ee
      [ 1237.933984] Call Trace:
      [ 1237.934434] dump_stack (lib/dump_stack.c:52)
      [ 1237.935323] ___might_sleep (kernel/sched/core.c:7339)
      [ 1237.936259] ? mark_held_locks (kernel/locking/lockdep.c:2549)
      [ 1237.937293] __might_sleep (kernel/sched/core.c:7305)
      [ 1237.938272] __kmalloc (mm/slub.c:1262 mm/slub.c:2419 mm/slub.c:2491 mm/slub.c:3291)
      [ 1237.939137] ? resp_rsup_opcodes (include/linux/slab.h:435 drivers/scsi/scsi_debug.c:1689)
      [ 1237.940173] resp_rsup_opcodes (include/linux/slab.h:435 drivers/scsi/scsi_debug.c:1689)
      [ 1237.941211] ? add_host_store (drivers/scsi/scsi_debug.c:1584)
      [ 1237.942261] scsi_debug_queuecommand (drivers/scsi/scsi_debug.c:5276)
      [ 1237.943404] ? blk_rq_map_sg (block/blk-merge.c:254)
      [ 1237.944398] ? scsi_init_sgtable (drivers/scsi/scsi_lib.c:1095)
      [ 1237.945402] sdebug_queuecommand_lock_or_not (drivers/scsi/scsi_debug.c:5300)
      [ 1237.946735] scsi_dispatch_cmd (drivers/scsi/scsi_lib.c:1706)
      [ 1237.947720] scsi_queue_rq (drivers/scsi/scsi_lib.c:1996)
      [ 1237.948687] __blk_mq_run_hw_queue (block/blk-mq.c:816)
      [ 1237.949796] blk_mq_run_hw_queue (block/blk-mq.c:896)
      [ 1237.950903] ? _raw_spin_unlock (./arch/x86/include/asm/preempt.h:95 include/linux/spinlock_api_smp.h:154 kernel/locking/spinlock.c:183)
      [ 1237.951862] blk_mq_insert_request (block/blk-mq.c:1037)
      [ 1237.952876] blk_execute_rq_nowait (block/blk-exec.c:95)
      [ 1237.953981] ? lockdep_init_map (kernel/locking/lockdep.c:3034)
      [ 1237.954967] blk_execute_rq (block/blk-exec.c:131)
      [ 1237.955929] ? blk_rq_bio_prep (block/blk-core.c:2835)
      [ 1237.956913] scsi_execute (drivers/scsi/scsi_lib.c:252)
      [ 1237.957821] scsi_execute_req_flags (drivers/scsi/scsi_lib.c:281)
      [ 1237.958968] scsi_report_opcode (drivers/scsi/scsi.c:956)
      [ 1237.960009] sd_revalidate_disk (drivers/scsi/sd.c:2707 drivers/scsi/sd.c:2792)
      [ 1237.961139] revalidate_disk (fs/block_dev.c:1081)
      [ 1237.962223] sd_rescan (drivers/scsi/sd.c:1532)
      [ 1237.963142] scsi_rescan_device (drivers/scsi/scsi_scan.c:1579)
      [ 1237.964165] store_rescan_field (drivers/scsi/scsi_sysfs.c:672)
      [ 1237.965254] dev_attr_store (drivers/base/core.c:138)
      [ 1237.966319] sysfs_kf_write (fs/sysfs/file.c:131)
      [ 1237.967289] kernfs_fop_write (fs/kernfs/file.c:311)
      [ 1237.968274] do_readv_writev (fs/read_write.c:722 fs/read_write.c:854)
      [ 1237.969295] ? __acct_update_integrals (kernel/tsacct.c:145)
      [ 1237.970452] ? kernfs_fop_open (fs/kernfs/file.c:271)
      [ 1237.971505] ? _raw_spin_unlock (./arch/x86/include/asm/preempt.h:95 include/linux/spinlock_api_smp.h:154 kernel/locking/spinlock.c:183)
      [ 1237.972512] ? context_tracking_user_exit (include/linux/vtime.h:89 include/linux/jump_label.h:114 include/trace/events/context_tracking.h:47 kernel/context_tracking.c:140)
      [ 1237.973668] ? trace_hardirqs_on_caller (kernel/locking/lockdep.c:2578 kernel/locking/lockdep.c:2625)
      [ 1237.974882] ? trace_hardirqs_on (kernel/locking/lockdep.c:2633)
      [ 1237.975850] vfs_writev (fs/read_write.c:893)
      [ 1237.976691] SyS_writev (fs/read_write.c:926 fs/read_write.c:917)
      [ 1237.977538] system_call_fastpath (arch/x86/kernel/entry_64.S:423)
      
      Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
      Acked-by: default avatarDouglas Gilbert <dgilbert@interlog.com>
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      99531e60
  4. 09 Jan, 2015 2 commits
  5. 15 Dec, 2014 3 commits
  6. 04 Dec, 2014 2 commits
  7. 25 Nov, 2014 5 commits
  8. 24 Nov, 2014 3 commits
  9. 12 Nov, 2014 4 commits
  10. 14 Oct, 2014 1 commit
  11. 30 Sep, 2014 1 commit
  12. 16 Sep, 2014 3 commits
  13. 26 Jul, 2014 1 commit
    • Douglas Gilbert's avatar
      scsi_debug: support scsi-mq, queues and locks · cbf67842
      Douglas Gilbert authored
      
      
       - add host_lock option whose default value is 0 which removes the
         host_lock around all queued commands
       - accept delay=-1 (_hi_) or -2 which use a tasklet to invoke
         the scsi_done callback into the mid-layer. The default
         is still delay=1 which uses a timer to delay 1 jiffy
       - wire .change_queue_depth and .change_queue_type
         functions to better simulate queueing in a modern LLD
       - add SCSI_DEBUG_OPT_Q_NOISE (0x200) mask to only produce
         debug output associated with queue full, plus from
         .change_queue_depth and .change_queue_type functions
       - add SCSI_DEBUG_OPT_ALL_TSF (0x400) mask which reports
         all queued_arr fulls at TASK_SET_FULL, otherwise
         SCSI_MLQUEUE_HOST_BUSY is returned
       - add SCSI_DEBUG_OPT_RARE_TSF (0x800) mask which works
         together with the every_nth option (> 0) to count
         occurrences of num_in_q==queue_depth. When every_nth
         is reached the victim (a command) yields TASK SET FULL
       - clean up many debug messages.
       - add ndelay=<nanosecs> option that uses high resolution
         timers; active if > 0 and then overrides delay= option
       - expand Unit Attention handling: POR, BUS_RESET and
         MODE PARAMETERS CHANGED
       - support .eh_target_reset_handler and drop .bios_param
       - add OPT_N_WCE mask so caching page yields WCE=0
       - add OPT_RESET_NOISE mask to log aborts and resets
       - add OPT_NO_CDB_NOISE mask to not log each cdb
       - MODE SELECT support for changing caching page's WCE
       - name common ioctls in log
       - when fake_rw=1, do not vmalloc fake store; make
         UNMAP and WRITE SAME obey fake_rw
       - more logging and code improvements including better
         sense buffer handling
      
      With fio and four (pseudo) devices I have observed 1.2 M IOPS
      on my equipment. Rob Elliott who has done much testing and made
      numerous suggestions, has better IOPS results than mine.
      
      Signed-off-by: default avatarDouglas Gilbert <dgilbert@interlog.com>
      Reviewed-by: default avatarRobert Elliott <elliott@hp.com>
      Tested-by: default avatarRobert Elliott <elliott@hp.com>
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      cbf67842
  14. 17 Jul, 2014 2 commits
  15. 19 May, 2014 1 commit
  16. 19 Mar, 2014 7 commits
  17. 16 Dec, 2013 1 commit
  18. 25 Oct, 2013 1 commit