lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 19 Sep 2008 13:28:45 -0400 (EDT)
From:	Kiyoshi Ueda <k-ueda@...jp.nec.com>
To:	michaelc@...wisc.edu
Cc:	dm-devel@...hat.com, James.Bottomley@...senPartnership.com,
	j-nomura@...jp.nec.com, linux-kernel@...r.kernel.org,
	linux-scsi@...r.kernel.org, k-ueda@...jp.nec.com
Subject: Re: [dm-devel] [PATCH 2/2] scsi: exports busy status via
 bdi_lld_congested

Hi Mike,

On Fri, 19 Sep 2008 11:06:04 -0500, Mike Christie wrote:
> Kiyoshi Ueda wrote:
> > This patch change scsi mid layer to export its busy status.
> > Not set the busy flag, when scsi can't dispatch I/Os anymore and
> > needs to kill I/Os.  Otherwise, request stacking drivers may hold
> > requests forever.
> > 
> > 
> > Signed-off-by: Kiyoshi Ueda <k-ueda@...jp.nec.com>
> > Signed-off-by: Jun'ichi Nomura <j-nomura@...jp.nec.com>
> > Cc: James Bottomley <James.Bottomley@...senPartnership.com>
> > ---
> >  drivers/scsi/scsi.c     |    4 ++--
> >  drivers/scsi/scsi_lib.c |   23 ++++++++++++++++++++++-
> >  2 files changed, 24 insertions(+), 3 deletions(-)
> > 
> > Index: scsi-misc-2.6/drivers/scsi/scsi_lib.c
> > ===================================================================
> > --- scsi-misc-2.6.orig/drivers/scsi/scsi_lib.c
> > +++ scsi-misc-2.6/drivers/scsi/scsi_lib.c
> > @@ -459,17 +459,30 @@ static void scsi_init_cmd_errh(struct sc
> >  
> >  void scsi_device_unbusy(struct scsi_device *sdev)
> >  {
> > +	int host_congested;
> >  	struct Scsi_Host *shost = sdev->host;
> >  	unsigned long flags;
> >  
> >  	spin_lock_irqsave(shost->host_lock, flags);
> >  	shost->host_busy--;
> > +	if ((shost->can_queue > 0 && shost->host_busy >= shost->can_queue) ||
> > +	    shost->host_blocked || shost->host_self_blocked ||
> > +	    scsi_host_in_recovery(shost))
> > +		host_congested = 1;
> > +	else
> > +		host_congested = 0;
> > +
> 
> You might want to check if the starget busy too (scsi-misc has this but 
> Jens's tree and linus do not)? The code below that I snipped from 
> scsi_request_fn will set the congested bits if scsi_target_queue_ready 
> returns 0, so above here you would want to clear it if it not congested 
> anymore.

Yes, thank you for noticing that.
Since I was looking at scsi-misc and your target patch is in
scsi-post-merge, I overlooked it.
I'll rebase my patches and repost again.

Thanks,
Kiyoshi Ueda
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ