All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <Bart.VanAssche@sandisk.com>
To: "hch@lst.de" <hch@lst.de>, "axboe@fb.com" <axboe@fb.com>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"linux-raid@vger.kernel.org" <linux-raid@vger.kernel.org>,
	"dm-devel@redhat.com" <dm-devel@redhat.com>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	"snitzer@redhat.com" <snitzer@redhat.com>,
	"j-nomura@ce.jp.nec.com" <j-nomura@ce.jp.nec.com>
Subject: Re: split scsi passthrough fields out of struct request V2
Date: Thu, 26 Jan 2017 18:29:08 +0000	[thread overview]
Message-ID: <1485455329.2540.7.camel@sandisk.com> (raw)
In-Reply-To: <1485365126-23210-1-git-send-email-hch@lst.de>

On Wed, 2017-01-25 at 18:25 +0100, Christoph Hellwig wrote:
> Hi all,
> 
> this series splits the support for SCSI passthrough commands from the
> main struct request used all over the block layer into a separate
> scsi_request structure that drivers that want to support SCSI passthough
> need to embedded as the first thing into their request-private data,
> similar to how we handle NVMe passthrough commands.
> 
> To support this I've added support for that the private data after
> request structure to the legacy request path instead, so that it can
> be treated the same way as the blk-mq path.  Compare to the current
> scsi_cmnd allocator that actually is a major simplification.
> 
> Changes since V1:
>  - fix handling of a NULL sense pointer in __scsi_execute
>  - clean up handling of the flush flags in the block layer and MD
>  - additional small cleanup in dm-rq

Hello Christoph,

Thanks for having fixed the NULL pointer issue I had reported for v1.
However, if I try to run my srp-test testsuite on top of your
hch-block/block-pc-refactor branch (commit ID a07dc3521034) merged
with v4.10-rc5 the following appears on the console:

[  707.317403] BUG: scheduling while atomic: fio/9073/0x00000003
[  707.317404] 1 lock held by fio/9073:
[  707.317404]  #0:  (rcu_read_lock){......}, at: [<ffffffff8132618e>] __blk_mq_run_hw_queue+0xde/0x1c0
[  707.317409] Modules linked in: dm_service_time ib_srp scsi_transport_srp target_core_user uio target_core_pscsi target_core_file ib_srpt target_core_iblock target_core_mod brd netconsole xt_CHECKSUM iptable_mangle ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat nf_nat_ipv4 nf_nat libcrc32c nf_conntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack ipt_REJECT nf_reject_ipv4 xt_tcpudp tun bridge stp llc ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter ip_tables x_tables af_packet ib_ipoib rdma_ucm ib_ucm ib_uverbs ib_umad rdma_cm configfs ib_cm iw_cm msr mlx4_ib ib_core sb_edac edac_core x86_pkg_temp_thermal intel_powerclamp coretemp ipmi_ssif kvm_intel kvm irqbypass crct10dif_pclmul crc32_pclmul mlx4_core crc32c_intel ghash_clmulni_intel hid_generic pcbc usbhid iTCO_wdt tg3 aesni_intel
[  707.317445]  ptp iTCO_vendor_support aes_x86_64 crypto_simd pps_core glue_helper dcdbas ipmi_si ipmi_devintf libphy devlink lpc_ich cryptd pcspkr ipmi_msghandler mfd_core fjes mei_me tpm_tis button tpm_tis_core shpchp mei tpm wmi mgag200 i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops ttm sr_mod cdrom drm ehci_pci ehci_hcd usbcore usb_common sg dm_multipath dm_mod scsi_dh_rdac scsi_dh_emc scsi_dh_alua autofs4
[  707.317469] CPU: 6 PID: 9073 Comm: fio Tainted: G        W       4.10.0-rc5-dbg+ #1
[  707.317470] Hardware name: Dell Inc. PowerEdge R430/03XKDV, BIOS 1.0.2 11/17/2014
[  707.317470] Call Trace:
[  707.317473]  dump_stack+0x68/0x93
[  707.317475]  __schedule_bug+0x5b/0x80
[  707.317477]  __schedule+0x762/0xb00
[  707.317479]  schedule+0x38/0x90
[  707.317481]  schedule_timeout+0x2fe/0x640
[  707.317491]  io_schedule_timeout+0x9f/0x110
[  707.317493]  blk_mq_get_tag+0x158/0x260
[  707.317496]  __blk_mq_alloc_request+0x16/0xe0
[  707.317498]  blk_mq_sched_get_request+0x30d/0x360
[  707.317502]  blk_mq_alloc_request+0x3b/0x90
[  707.317505]  blk_get_request+0x2f/0x110
[  707.317507]  multipath_clone_and_map+0xcd/0x140 [dm_multipath]
[  707.317512]  map_request+0x3c/0x290 [dm_mod]
[  707.317517]  dm_mq_queue_rq+0x77/0x100 [dm_mod]
[  707.317519]  blk_mq_dispatch_rq_list+0x1ff/0x320
[  707.317521]  blk_mq_sched_dispatch_requests+0xa9/0xe0
[  707.317523]  __blk_mq_run_hw_queue+0x122/0x1c0
[  707.317528]  blk_mq_run_hw_queue+0x84/0x90
[  707.317530]  blk_mq_flush_plug_list+0x39f/0x480
[  707.317531]  blk_flush_plug_list+0xee/0x270
[  707.317533]  blk_finish_plug+0x27/0x40
[  707.317534]  do_io_submit+0x475/0x900
[  707.317537]  SyS_io_submit+0xb/0x10
[  707.317539]  entry_SYSCALL_64_fastpath+0x18/0xad

Bart.

WARNING: multiple messages have this Message-ID (diff)
From: Bart Van Assche <Bart.VanAssche@sandisk.com>
To: "hch@lst.de" <hch@lst.de>, "axboe@fb.com" <axboe@fb.com>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"linux-raid@vger.kernel.org" <linux-raid@vger.kernel.org>,
	"dm-devel@redhat.com" <dm-devel@redhat.com>,
	"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
	"snitzer@redhat.com" <snitzer@redhat.com>,
	"j-nomura@ce.jp.nec.com" <j-nomura@ce.jp.nec.com>
Subject: Re: split scsi passthrough fields out of struct request V2
Date: Thu, 26 Jan 2017 18:29:08 +0000	[thread overview]
Message-ID: <1485455329.2540.7.camel@sandisk.com> (raw)
In-Reply-To: <1485365126-23210-1-git-send-email-hch@lst.de>

On Wed, 2017-01-25 at 18:25 +0100, Christoph Hellwig wrote:
> Hi all,
>=20
> this series splits the support for SCSI passthrough commands from the
> main struct request used all over the block layer into a separate
> scsi_request structure that drivers that want to support SCSI passthough
> need to embedded as the first thing into their request-private data,
> similar to how we handle NVMe passthrough commands.
>=20
> To support this I've added support for that the private data after
> request structure to the legacy request path instead, so that it can
> be treated the same way as the blk-mq path.  Compare to the current
> scsi_cmnd allocator that actually is a major simplification.
>=20
> Changes since V1:
>  - fix handling of a NULL sense pointer in __scsi_execute
>  - clean up handling of the flush flags in the block layer and MD
>  - additional small cleanup in dm-rq

Hello Christoph,

Thanks for having fixed the NULL pointer issue I had reported for v1.
However, if I try to run my srp-test testsuite on top of your
hch-block/block-pc-refactor=A0branch (commit ID a07dc3521034) merged
with v4.10-rc5 the following appears on the console:

[  707.317403] BUG: scheduling while atomic: fio/9073/0x00000003
[  707.317404] 1 lock held by fio/9073:
[  707.317404]  #0:  (rcu_read_lock){......}, at: [<ffffffff8132618e>] __bl=
k_mq_run_hw_queue+0xde/0x1c0
[  707.317409] Modules linked in: dm_service_time ib_srp scsi_transport_srp=
 target_core_user uio target_core_pscsi target_core_file ib_srpt target_cor=
e_iblock target_core_mod brd netconsole xt_CHECKSUM iptable_mangle ipt_MASQ=
UERADE nf_nat_masquerade_ipv4 iptable_nat nf_nat_ipv4 nf_nat libcrc32c nf_c=
onntrack_ipv4 nf_defrag_ipv4 xt_conntrack nf_conntrack ipt_REJECT nf_reject=
_ipv4 xt_tcpudp tun bridge stp llc ebtable_filter ebtables ip6table_filter =
ip6_tables iptable_filter ip_tables x_tables af_packet ib_ipoib rdma_ucm ib=
_ucm ib_uverbs ib_umad rdma_cm configfs ib_cm iw_cm msr mlx4_ib ib_core sb_=
edac edac_core x86_pkg_temp_thermal intel_powerclamp coretemp ipmi_ssif kvm=
_intel kvm irqbypass crct10dif_pclmul crc32_pclmul mlx4_core crc32c_intel g=
hash_clmulni_intel hid_generic pcbc usbhid iTCO_wdt tg3 aesni_intel
[  707.317445]  ptp iTCO_vendor_support aes_x86_64 crypto_simd pps_core glu=
e_helper dcdbas ipmi_si ipmi_devintf libphy devlink lpc_ich cryptd pcspkr i=
pmi_msghandler mfd_core fjes mei_me tpm_tis button tpm_tis_core shpchp mei =
tpm wmi mgag200 i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgb=
lt fb_sys_fops ttm sr_mod cdrom drm ehci_pci ehci_hcd usbcore usb_common sg=
 dm_multipath dm_mod scsi_dh_rdac scsi_dh_emc scsi_dh_alua autofs4
[  707.317469] CPU: 6 PID: 9073 Comm: fio Tainted: G        W       4.10.0-=
rc5-dbg+ #1
[  707.317470] Hardware name: Dell Inc. PowerEdge R430/03XKDV, BIOS 1.0.2 1=
1/17/2014
[  707.317470] Call Trace:
[  707.317473]  dump_stack+0x68/0x93
[  707.317475]  __schedule_bug+0x5b/0x80
[  707.317477]  __schedule+0x762/0xb00
[  707.317479]  schedule+0x38/0x90
[  707.317481]  schedule_timeout+0x2fe/0x640
[  707.317491]  io_schedule_timeout+0x9f/0x110
[  707.317493]  blk_mq_get_tag+0x158/0x260
[  707.317496]  __blk_mq_alloc_request+0x16/0xe0
[  707.317498]  blk_mq_sched_get_request+0x30d/0x360
[  707.317502]  blk_mq_alloc_request+0x3b/0x90
[  707.317505]  blk_get_request+0x2f/0x110
[  707.317507]  multipath_clone_and_map+0xcd/0x140 [dm_multipath]
[  707.317512]  map_request+0x3c/0x290 [dm_mod]
[  707.317517]  dm_mq_queue_rq+0x77/0x100 [dm_mod]
[  707.317519]  blk_mq_dispatch_rq_list+0x1ff/0x320
[  707.317521]  blk_mq_sched_dispatch_requests+0xa9/0xe0
[  707.317523]  __blk_mq_run_hw_queue+0x122/0x1c0
[  707.317528]  blk_mq_run_hw_queue+0x84/0x90
[  707.317530]  blk_mq_flush_plug_list+0x39f/0x480
[  707.317531]  blk_flush_plug_list+0xee/0x270
[  707.317533]  blk_finish_plug+0x27/0x40
[  707.317534]  do_io_submit+0x475/0x900
[  707.317537]  SyS_io_submit+0xb/0x10
[  707.317539]  entry_SYSCALL_64_fastpath+0x18/0xad

Bart.=

  parent reply	other threads:[~2017-01-26 18:29 UTC|newest]

Thread overview: 172+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-25 17:25 split scsi passthrough fields out of struct request V2 Christoph Hellwig
2017-01-25 17:25 ` [PATCH 01/18] block: add a op_is_flush helper Christoph Hellwig
2017-01-26  2:58   ` Martin K. Petersen
2017-01-26 22:38   ` Bart Van Assche
2017-01-25 17:25 ` [PATCH 02/18] md: cleanup bio op / flags handling in raid1_write_request Christoph Hellwig
2017-01-26  2:59   ` Martin K. Petersen
2017-01-26 23:18   ` Bart Van Assche
2017-01-26 23:18     ` Bart Van Assche
2017-01-25 17:25 ` [PATCH 03/18] block: fix elevator init check Christoph Hellwig
2017-01-26  3:01   ` Martin K. Petersen
2017-01-26 23:21   ` Bart Van Assche
2017-01-26 23:21     ` Bart Van Assche
2017-01-25 17:25 ` [PATCH 04/18] block: simplify blk_init_allocated_queue Christoph Hellwig
2017-01-26  3:02   ` Martin K. Petersen
2017-01-26 23:27   ` Bart Van Assche
2017-01-26 23:27     ` Bart Van Assche
2017-01-25 17:25 ` [PATCH 05/18] block: allow specifying size for extra command data Christoph Hellwig
2017-01-26  3:15   ` Martin K. Petersen
2017-01-27 16:12     ` Christoph Hellwig
2017-01-27 16:12       ` Christoph Hellwig
2017-01-27 17:21       ` Bart Van Assche
2017-01-27 17:21         ` Bart Van Assche
2017-01-27 17:26         ` Jens Axboe
2017-01-27 17:26           ` Jens Axboe
2017-01-27 17:30           ` Bart Van Assche
2017-01-27 17:30             ` Bart Van Assche
2017-01-27 17:33             ` Jens Axboe
2017-01-25 17:25 ` [PATCH 06/18] dm: remove incomple BLOCK_PC support Christoph Hellwig
2017-01-27 17:32   ` Bart Van Assche
2017-01-27 17:32     ` Bart Van Assche
2017-01-25 17:25 ` [PATCH 07/18] dm: always defer request allocation to the owner of the request_queue Christoph Hellwig
2017-01-27 16:34   ` Mike Snitzer
2017-01-27 16:34     ` Mike Snitzer
2017-01-27 16:36     ` Christoph Hellwig
2017-01-27 16:36       ` Christoph Hellwig
2017-01-27 16:44       ` Mike Snitzer
2017-01-27 16:44         ` Mike Snitzer
2017-01-25 17:25 ` [PATCH 08/18] scsi_dh_rdac: switch to scsi_execute_req_flags() Christoph Hellwig
2017-01-26  3:18   ` Martin K. Petersen
2017-01-25 17:25 ` [PATCH 09/18] scsi_dh_emc: " Christoph Hellwig
2017-01-26  3:19   ` Martin K. Petersen
2017-01-25 17:25 ` [PATCH 10/18] scsi_dh_hp_sw: " Christoph Hellwig
2017-01-26  3:20   ` Martin K. Petersen
2017-01-26  3:20     ` Martin K. Petersen
2017-01-25 17:25 ` [PATCH 11/18] scsi: remove gfp_flags member in scsi_host_cmd_pool Christoph Hellwig
2017-01-26  3:21   ` Martin K. Petersen
2017-01-27 17:38   ` Bart Van Assche
2017-01-27 17:38     ` Bart Van Assche
2017-01-25 17:25 ` [PATCH 12/18] scsi: respect unchecked_isa_dma for blk-mq Christoph Hellwig
2017-01-26  3:23   ` Martin K. Petersen
2017-01-27 17:45   ` Bart Van Assche
2017-01-27 17:45     ` Bart Van Assche
2017-01-25 17:25 ` [PATCH 13/18] scsi: remove scsi_cmd_dma_pool Christoph Hellwig
2017-01-26  3:24   ` Martin K. Petersen
2017-01-27 17:51   ` Bart Van Assche
2017-01-27 17:51     ` Bart Van Assche
2017-01-25 17:25 ` [PATCH 14/18] scsi: remove __scsi_alloc_queue Christoph Hellwig
2017-01-26  3:25   ` Martin K. Petersen
2017-01-27 17:58   ` Bart Van Assche
2017-01-27 17:58     ` Bart Van Assche
2017-01-28  8:23     ` hch
2017-01-25 17:25 ` [PATCH 15/18] scsi: allocate scsi_cmnd structures as part of struct request Christoph Hellwig
2017-01-26  3:30   ` Martin K. Petersen
2017-01-27 18:39   ` Bart Van Assche
2017-01-27 18:39     ` Bart Van Assche
2017-01-28  8:25     ` hch
2017-01-28  8:25       ` hch
2017-01-25 17:25 ` [PATCH 16/18] block/bsg: move queue creation into bsg_setup_queue Christoph Hellwig
2017-01-27 18:48   ` Bart Van Assche
2017-01-27 18:48     ` Bart Van Assche
2017-01-25 17:25 ` [PATCH 17/18] block: split scsi_request out of struct request Christoph Hellwig
2017-01-25 17:25 ` [PATCH 18/18] block: don't assign cmd_flags in __blk_rq_prep_clone Christoph Hellwig
2017-01-26  3:31   ` Martin K. Petersen
2017-01-26 18:29 ` Bart Van Assche [this message]
2017-01-26 18:29   ` split scsi passthrough fields out of struct request V2 Bart Van Assche
2017-01-26 18:44   ` Jens Axboe
2017-01-26 18:52     ` Bart Van Assche
2017-01-26 18:52       ` Bart Van Assche
2017-01-26 18:57       ` Jens Axboe
2017-01-26 18:59         ` hch
2017-01-26 19:01           ` Jens Axboe
2017-01-26 19:01             ` Jens Axboe
2017-01-26 20:47             ` [dm-devel] " Bart Van Assche
2017-01-26 20:54               ` Jens Axboe
2017-01-26 20:54                 ` [dm-devel] " Jens Axboe
2017-01-26 21:01                 ` Bart Van Assche
2017-01-26 21:01                   ` Bart Van Assche
2017-01-26 21:12                   ` Jens Axboe
2017-01-26 21:12                     ` [dm-devel] " Jens Axboe
2017-01-26 21:47                     ` Bart Van Assche
2017-01-26 21:47                       ` [dm-devel] " Bart Van Assche
2017-01-26 21:51                       ` Jens Axboe
2017-01-26 21:51                         ` [dm-devel] " Jens Axboe
2017-01-26 23:14                         ` Bart Van Assche
2017-01-26 23:14                           ` Bart Van Assche
2017-01-26 23:26                           ` Jens Axboe
2017-01-26 23:26                             ` Jens Axboe
2017-01-26 23:26                             ` [dm-devel] " Jens Axboe
2017-01-26 23:47                             ` Bart Van Assche
2017-01-26 23:47                               ` [dm-devel] " Bart Van Assche
2017-01-26 23:50                               ` Jens Axboe
2017-01-27  0:33                                 ` Jens Axboe
2017-01-27  0:33                                   ` [dm-devel] " Jens Axboe
2017-01-27  0:38                                 ` Bart Van Assche
2017-01-27  0:38                                   ` Bart Van Assche
2017-01-27  0:41                                   ` Jens Axboe
2017-01-27  1:15                                     ` Bart Van Assche
2017-01-27  1:15                                       ` [dm-devel] " Bart Van Assche
2017-01-27  1:22                                       ` Jens Axboe
2017-01-27  1:22                                         ` [dm-devel] " Jens Axboe
2017-01-27  6:40                                         ` Jens Axboe
2017-01-27  8:04                                           ` Jens Axboe
2017-01-27  8:04                                             ` [dm-devel] " Jens Axboe
2017-01-27 16:52                                             ` Bart Van Assche
2017-01-27 16:52                                               ` [dm-devel] " Bart Van Assche
2017-01-27 16:56                                               ` Jens Axboe
2017-01-27 16:56                                                 ` [dm-devel] " Jens Axboe
2017-01-27 17:03                                                 ` Bart Van Assche
2017-01-27 17:03                                                   ` [dm-devel] " Bart Van Assche
2017-01-31  1:12                                                 ` Bart Van Assche
2017-01-31  1:12                                                   ` Bart Van Assche
2017-01-31  1:38                                                   ` Jens Axboe
2017-01-31  1:38                                                     ` Jens Axboe
2017-01-31  4:13                                                     ` Jens Axboe
2017-01-31  4:13                                                       ` [dm-devel] " Jens Axboe
2017-01-31 21:35                                                     ` Bart Van Assche
2017-01-31 21:35                                                       ` Bart Van Assche
2017-01-31 21:55                                                       ` Bart Van Assche
2017-01-31 21:55                                                         ` Bart Van Assche
2017-01-31 21:58                                                         ` Jens Axboe
2017-02-01  1:01                                                           ` Bart Van Assche
2017-02-01  6:38                                                             ` Jens Axboe
2017-02-01 16:46                                                               ` Bart Van Assche
2017-02-01 17:13                                                                 ` Jens Axboe
2017-02-01 17:28                                                                   ` Bart Van Assche
2017-02-01 19:21                                                                   ` Bart Van Assche
2017-02-01 22:01                                                                   ` Bart Van Assche
2017-02-02 17:27                                                                     ` Bart Van Assche
2017-02-02 18:33                                                                       ` Mike Snitzer
2017-02-02 18:43                                                                         ` Bart Van Assche
2017-02-02 19:13                                                                           ` Mike Snitzer
2017-02-02 19:46                                                                             ` Bart Van Assche
2017-02-02 21:04                                                                               ` Mike Snitzer
2017-02-02 21:10                                                                                 ` Mike Snitzer
2017-02-03  0:20                                                                                   ` Bart Van Assche
2017-02-03  0:42                                                                                     ` Mike Snitzer
2017-02-02 22:38                                                                                 ` Bart Van Assche
2017-01-27 17:02                                         ` [dm-devel] " Bart Van Assche
2017-01-27 17:02                                           ` Bart Van Assche
2017-01-27 16:11 ` Jens Axboe
2017-01-27 16:11   ` Jens Axboe
2017-01-27 16:17   ` Christoph Hellwig
2017-01-27 16:17     ` Christoph Hellwig
2017-01-27 16:21     ` Jens Axboe
2017-01-27 16:21       ` Jens Axboe
2017-01-27 16:23       ` Christoph Hellwig
2017-01-27 16:23         ` Christoph Hellwig
2017-01-27 16:27         ` Jens Axboe
2017-01-27 16:27           ` Jens Axboe
2017-01-27 16:34           ` Christoph Hellwig
2017-01-27 16:34             ` Christoph Hellwig
2017-01-27 16:38             ` Jens Axboe
2017-01-27 16:38               ` Jens Axboe
2017-01-27 16:42               ` Christoph Hellwig
2017-01-27 16:42                 ` Christoph Hellwig
2017-01-27 16:58                 ` Jens Axboe
2017-01-27 16:58                   ` Jens Axboe
2017-01-27 21:27 ` Bart Van Assche
2017-01-27 21:27   ` Bart Van Assche
2017-01-28  8:29   ` hch
2017-01-30  6:58   ` Hannes Reinecke
2017-01-30  6:58     ` Hannes Reinecke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1485455329.2540.7.camel@sandisk.com \
    --to=bart.vanassche@sandisk.com \
    --cc=axboe@fb.com \
    --cc=dm-devel@redhat.com \
    --cc=hch@lst.de \
    --cc=j-nomura@ce.jp.nec.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=snitzer@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.