Silencing 'killing requests for dead queue'
PATCH 1/1 Silencing 'killing requests for dead queue'
When we tear down a device we try to flush all outstanding commands in scsi_free_queue(). However the check in scsi_request_fn() is imperfect as it only signals that we _might start_ aborting commands, not that we've actually aborted some.
So move the printk inside the scsi_kill_request function, this will also give us a hint about which commands are aborted.
drivers/scsi/scsi_lib.c +2 -1
@@ -1409,6 +1409,8 @@ static void scsi_kill_request(struct request *req, struct request_queue *q)blk_start_request (req); +scmd_printk (KERN_INFO , cmd,"killing request\n" ); + sdev = cmd->device; starget =scsi_target (sdev); shost = sdev->host;
@@ -1490,7 +1492,6 @@ static void scsi_request_fn(struct request_queue *q)struct request *req;if (!sdev) { -printk ("scsi: killing requests for dead queue\n" );while ((req =blk_peek_request (q)) !=NULL )scsi_kill_request (req, q);return ;
Quoted 24 lines · Hannes Reinecke
When we tear down a device we try to flush all outstanding commands in
scsi_free_queue(). However the check inscsi_request_fn()is imperfect as it only signals that we_mightstart_aborting commands, not that we've actually aborted some.
So move the printk inside thescsi_kill_requestfunction, this will also give us a hint about which commands are aborted.Signed-off-by Hannes Reinecke <[email protected]>drivers/scsi/scsi_lib.c +2
-0@@ -1409,6 +1409,8 @@ static void scsi_kill_request(struct request *req, struct request_queue *q) blk_start_request(req); + scmd_printk(KERN_INFO, cmd, "killing request\n"); + sdev = cmd->device; starget = scsi_target(sdev); shost = sdev->host;
drivers/scsi/scsi_lib.c static void scsi_request_fn(struct request_queue *q) · line 1497
Quoted 7 lines
drivers/scsi/scsi_lib.c +0
-1@@ -1490,7 +1492,6 @@ static void scsi_request_fn(struct request_queue *q) struct request *req; if (!sdev) { - printk("scsi: killing requests for dead queue\n"); while ((req = blk_peek_request(q)) != NULL) scsi_kill_request(req, q); return;
Can this message appear during LUN scanning and hence confuse users ?
Also, patch 3308511 is already present in several stable trees so shouldn't a patch like the above CC [email protected] too ?
Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 27 lines · Bart Van Assche
Quoted 26 lines · Hannes Reinecke
When we tear down a device we try to flush all outstanding commands in
scsi_free_queue(). However the check inscsi_request_fn()is imperfect as it only signals that we_mightstart_aborting commands, not that we've actually aborted some.
So move the printk inside thescsi_kill_requestfunction, this will also give us a hint about which commands are aborted.Signed-off-by Hannes Reinecke<[email protected]>drivers/scsi/scsi_lib.c +2
-0@@ -1409,6 +1409,8 @@ static void scsi_kill_request(struct request *req, struct request_queue *q)blk_start_request (req); +scmd_printk (KERN_INFO , cmd,"killing request\n" ); + sdev = cmd->device; starget =scsi_target (sdev); shost = sdev->host;@@ -1490,7 +1492,6 @@ static void scsi_request_fn(struct request_queue *q)struct request *req;
Quoted 8 lines
drivers/scsi/scsi_lib.c static void scsi_request_fn(struct request_queue *q) · line 1497
Quoted 5 lines
drivers/scsi/scsi_lib.c +0
-1if (!sdev) { -printk ("scsi: killing requests for dead queue\n" );while ((req =blk_peek_request (q)) !=NULL )scsi_kill_request (req, q);return ;Can this message appear during LUN scanning and hence confuse users ?
Precisely.
Which incidentally also tells us that none of the maintainer tested the original patch on SCSI parallel machines :-)
Quoted 3 lines
Also, patch 3308511 is already present in several stable trees so shouldn't a patch like the above CC [email protected] too ?
Oh. Of course.
Cheers,
Hannes
Signature · 8 lines
Dr. Hannes Reinecke zSeries & Storage [email protected] +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg) -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi James,
Quoted 10 lines · On Wed, 9 Nov 2011 08:39:24 +0100 Hannes Reinecke <[email protected]> wrote:
When we tear down a device we try to flush all outstanding commands in
scsi_free_queue(). However the check inscsi_request_fn()is imperfect as it only signals that we_mightstart_aborting commands, not that we've actually aborted some.
So move the printk inside thescsi_kill_requestfunction, this will also give us a hint about which commands are aborted.Signed-off-by Hannes Reinecke <[email protected]>
[I realise that you have already committed this fix, but I thought I should test it anyway.]
ipr_init is now down to 2543495 usecs (down from 494857993 usecs without this patch) and the machine boots as well as can be expected.
Signature · 3 lines
Cheers, Stephen Rothwell [email protected] http://www.canb.auug.org.au/~sfr/
Quoted 2 lines · Stephen Rothwell
ipr_initis now down to 2543495 usecs (down from 494857993 usecs without this patch) and the machine boots as well as can be expected.
These timing differences are puzzling me. Have you been able to find out what is causing them ? Are kernel messages on that system perhaps sent to a serial console ?
Bart.
Hi Bart,
Quoted 8 lines · On Thu, 10 Nov 2011 12:57:37 +0100 Bart Van Assche <[email protected]> wrote:
Quoted 2 lines · Stephen Rothwell
ipr_initis now down to 2543495 usecs (down from 494857993 usecs without this patch) and the machine boots as well as can be expected.These timing differences are puzzling me. Have you been able to find out what is causing them ? Are kernel messages on that system perhaps sent to a serial console ?
Yeah, effectively (not actually serial, but close enough). And there were a very large number of messages.
Signature · 3 lines
Cheers, Stephen Rothwell [email protected] http://www.canb.auug.org.au/~sfr/