在 2022/1/14 19:38, John Garry 写道:
On 14/01/2022 01:07, chenxiang (M) wrote:
As before, it's useful to mention when it was last used, if ever.
I tried to find when it was last used, but not find. The struct scsi_host_cmd_pool is brought by the commit 89d9a567952b ("[SCSI] add support for per-host cmd pools"), and also add some API of scsi_host_cmd_pool (such as function scsi_{alloc, free, get, put, find}_host_cmd_pool()), but don't find where they are removed.
Is it this commit:
commit e9c787e65c0c36529745be47d490d998b4b6e589 (refs/bisect/bad) Author: Christoph Hellwig hch@lst.de Date: Mon Jan 2 21:55:26 2017 +0300
scsi: allocate scsi_cmnd structures as part of struct request Rely on the new block layer functionality to allocate additional
driver specific data behind struct request instead of implementing it in SCSI itѕelf.
Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Jens Axboe <axboe@fb.com>
Here's my bisect log, based purely on the grep of scsi_host_cmd_pool:
Yes, it seems the patch we need to mention. I also noticed this commit before, but in this patch I found that it removes scsi_host_cmd_pool from the structure Scsi_Host not from structure scsi_host_template while it adds scsi_host_cmd_pool to structure scsi_host_template in commit 89d9a567952b ("[SCSI] add support for per-host cmd pools").
git bisect start # good: [89d9a567952baec13e26ada3e438f1b642d66b6e] [SCSI] add support for per-host cmd pools git bisect good 89d9a567952baec13e26ada3e438f1b642d66b6e # bad: [df0cc57e057f18e44dac8e6c18aba47ab53202f9] Linux 5.16 git bisect bad df0cc57e057f18e44dac8e6c18aba47ab53202f9 # bad: [5bb053bef82523a8fd78d650bca81c9f114fa276] Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next git bisect bad 5bb053bef82523a8fd78d650bca81c9f114fa276 # good: [2c856e14dad8cb1b085ae1f30c5e125c6d46019b] Merge tag 'arm64-perf' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux git bisect good 2c856e14dad8cb1b085ae1f30c5e125c6d46019b # bad: [bd6aaf5535a6782b04e84ea575d65e95d2e7acbc] net: mvpp2: Improve a size determination in two functions git bisect bad bd6aaf5535a6782b04e84ea575d65e95d2e7acbc # good: [41844e36206be90cd4d962ea49b0abc3612a99d0] Merge tag 'staging-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging git bisect good 41844e36206be90cd4d962ea49b0abc3612a99d0 # good: [991688bfc63550b8c7ab9fb1de2feb44e3071d29] Merge tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc git bisect good 991688bfc63550b8c7ab9fb1de2feb44e3071d29 # bad: [b2064617c74f301dab1448f1f9c8dbb3c8021058] Merge tag 'driver-core-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core git bisect bad b2064617c74f301dab1448f1f9c8dbb3c8021058 # good: [828cad8ea05d194d8a9452e0793261c2024c23a2] Merge branch 'sched-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip git bisect good 828cad8ea05d194d8a9452e0793261c2024c23a2 # good: [005c3490e9db23738d91e02788606c0fe4734723] Revert "ath10k: Search SMBIOS for OEM board file extension" git bisect good 005c3490e9db23738d91e02788606c0fe4734723 # bad: [252b95c0edead46fb188042584d3dcd6d6ede062] Merge tag 'for-linus-4.11-rc0-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip git bisect bad 252b95c0edead46fb188042584d3dcd6d6ede062 # good: [fd4a61e08aa79f2b7835b25c6f94f27bd2d65990] sched/core: Fix build paravirt build on arm and arm64 git bisect good fd4a61e08aa79f2b7835b25c6f94f27bd2d65990 # bad: [cdc194705d26fdd7fc5446b5d830f2bbe2b22c30] Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi git bisect bad cdc194705d26fdd7fc5446b5d830f2bbe2b22c30 # good: [21c34006dce99949a83e9c46c543af28651db5db] scsi: megaraid_sas: megasas_return_cmd does not memset IO frame to zero git bisect good 21c34006dce99949a83e9c46c543af28651db5db # bad: [a1ae0f74a73fbd113647321c49032a561b3f3781] blk-mq-debug: Avoid that sparse complains about req_flags_t usage git bisect bad a1ae0f74a73fbd113647321c49032a561b3f3781 # good: [99cf1dc580f0766825395aae4f60ec1d8438f011] blk-mq: release driver tag on a requeue event git bisect good 99cf1dc580f0766825395aae4f60ec1d8438f011 # bad: [e9c787e65c0c36529745be47d490d998b4b6e589] scsi: allocate scsi_cmnd structures as part of struct request git bisect bad e9c787e65c0c36529745be47d490d998b4b6e589 # good: [6d247d7f71d1fa4b66a5f4da7b1daa21510d529b] block: allow specifying size for extra command data git bisect good 6d247d7f71d1fa4b66a5f4da7b1daa21510d529b # good: [b78205c93297b821974deaf607bc2efd89842621] scsi_dh_emc: switch to scsi_execute_req_flags() git bisect good b78205c93297b821974deaf607bc2efd89842621 # good: [0a6ac4ee7c21098cb0e41cc4053b9d9ddc9e70a1] scsi: respect unchecked_isa_dma for blk-mq git bisect good 0a6ac4ee7c21098cb0e41cc4053b9d9ddc9e70a1 # good: [d48777a633d6fa7ccde0f0e6509f0c01fbfc5299] scsi: remove __scsi_alloc_queue git bisect good d48777a633d6fa7ccde0f0e6509f0c01fbfc5299 # first bad commit: [e9c787e65c0c36529745be47d490d998b4b6e589] scsi: allocate scsi_cmnd structures as part of struct request .