* [PATCH] Silencing 'killing requests for dead queue' @ 2011-11-09 7:39 Hannes Reinecke 2011-11-09 11:53 ` Bart Van Assche 2011-11-10 2:10 ` Stephen Rothwell 0 siblings, 2 replies; 6+ messages in thread From: Hannes Reinecke @ 2011-11-09 7:39 UTC (permalink / raw) To: James Bottomley; +Cc: linux-scsi, Hannes Reinecke 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. Signed-off-by: Hannes Reinecke <hare@suse.de> diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 06bc265..f85cfa6 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -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; ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] Silencing 'killing requests for dead queue' 2011-11-09 7:39 [PATCH] Silencing 'killing requests for dead queue' Hannes Reinecke @ 2011-11-09 11:53 ` Bart Van Assche 2011-11-09 12:24 ` Hannes Reinecke 2011-11-10 2:10 ` Stephen Rothwell 1 sibling, 1 reply; 6+ messages in thread From: Bart Van Assche @ 2011-11-09 11:53 UTC (permalink / raw) To: Hannes Reinecke; +Cc: James Bottomley, linux-scsi On Wed, Nov 9, 2011 at 8:39 AM, Hannes Reinecke <hare@suse.de> wrote: > 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. > > Signed-off-by: Hannes Reinecke <hare@suse.de> > > diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c > index 06bc265..f85cfa6 100644 > --- a/drivers/scsi/scsi_lib.c > +++ b/drivers/scsi/scsi_lib.c > @@ -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; 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 stable@vger.kernel.org too ? Bart. -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Silencing 'killing requests for dead queue' 2011-11-09 11:53 ` Bart Van Assche @ 2011-11-09 12:24 ` Hannes Reinecke 0 siblings, 0 replies; 6+ messages in thread From: Hannes Reinecke @ 2011-11-09 12:24 UTC (permalink / raw) To: Bart Van Assche; +Cc: James Bottomley, linux-scsi, stable On 11/09/2011 12:53 PM, Bart Van Assche wrote: > On Wed, Nov 9, 2011 at 8:39 AM, Hannes Reinecke<hare@suse.de> wrote: >> 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. >> >> Signed-off-by: Hannes Reinecke<hare@suse.de> >> >> diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c >> index 06bc265..f85cfa6 100644 >> --- a/drivers/scsi/scsi_lib.c >> +++ b/drivers/scsi/scsi_lib.c >> @@ -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; > > 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 :-) > Also, patch 3308511 is already present in several stable trees so > shouldn't a patch like the above CC stable@vger.kernel.org too ? > Oh. Of course. Cheers, Hannes -- Dr. Hannes Reinecke zSeries & Storage hare@suse.de +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 majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Silencing 'killing requests for dead queue' 2011-11-09 7:39 [PATCH] Silencing 'killing requests for dead queue' Hannes Reinecke 2011-11-09 11:53 ` Bart Van Assche @ 2011-11-10 2:10 ` Stephen Rothwell 2011-11-10 11:57 ` Bart Van Assche 1 sibling, 1 reply; 6+ messages in thread From: Stephen Rothwell @ 2011-11-10 2:10 UTC (permalink / raw) To: James Bottomley; +Cc: Hannes Reinecke, linux-scsi [-- Attachment #1: Type: text/plain, Size: 923 bytes --] Hi James, On Wed, 9 Nov 2011 08:39:24 +0100 Hannes Reinecke <hare@suse.de> wrote: > > 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. > > Signed-off-by: Hannes Reinecke <hare@suse.de> Tested-by: Stephen Rothwell <sfr@canb.auug.org.au> [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. -- Cheers, Stephen Rothwell sfr@canb.auug.org.au http://www.canb.auug.org.au/~sfr/ [-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Silencing 'killing requests for dead queue' 2011-11-10 2:10 ` Stephen Rothwell @ 2011-11-10 11:57 ` Bart Van Assche 2011-11-10 12:13 ` Stephen Rothwell 0 siblings, 1 reply; 6+ messages in thread From: Bart Van Assche @ 2011-11-10 11:57 UTC (permalink / raw) To: Stephen Rothwell; +Cc: James Bottomley, Hannes Reinecke, linux-scsi On Thu, Nov 10, 2011 at 3:10 AM, Stephen Rothwell <sfr@canb.auug.org.au> wrote: > 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. 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. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Silencing 'killing requests for dead queue' 2011-11-10 11:57 ` Bart Van Assche @ 2011-11-10 12:13 ` Stephen Rothwell 0 siblings, 0 replies; 6+ messages in thread From: Stephen Rothwell @ 2011-11-10 12:13 UTC (permalink / raw) To: Bart Van Assche; +Cc: James Bottomley, Hannes Reinecke, linux-scsi [-- Attachment #1: Type: text/plain, Size: 723 bytes --] Hi Bart, On Thu, 10 Nov 2011 12:57:37 +0100 Bart Van Assche <bvanassche@acm.org> wrote: > > On Thu, Nov 10, 2011 at 3:10 AM, Stephen Rothwell <sfr@canb.auug.org.au> wrote: > > 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. > > 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. -- Cheers, Stephen Rothwell sfr@canb.auug.org.au http://www.canb.auug.org.au/~sfr/ [-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-11-10 12:13 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-11-09 7:39 [PATCH] Silencing 'killing requests for dead queue' Hannes Reinecke 2011-11-09 11:53 ` Bart Van Assche 2011-11-09 12:24 ` Hannes Reinecke 2011-11-10 2:10 ` Stephen Rothwell 2011-11-10 11:57 ` Bart Van Assche 2011-11-10 12:13 ` Stephen Rothwell
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox