public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@suse.de>
To: Dan Williams <dan.j.williams@intel.com>
Cc: dave.jiang@intel.com, linux-scsi@vger.kernel.org,
	David Milburn <dmilburn@redhat.com>,
	jacek.danecki@intel.com, jack_wang@usish.com,
	lindar_liu@usish.com, jeffrey.d.skirvin@intel.com,
	edmund.nadolski@intel.com, Srinivas <satyasrinivasp@hcl.in>
Subject: Re: [PATCH] libsas: flush initial device discovery before completing ->scan_finished()
Date: Fri, 18 Feb 2011 18:02:39 -0600	[thread overview]
Message-ID: <1298073759.3007.216.camel@mulgrave.site> (raw)
In-Reply-To: <20110217030633.4303.61603.stgit@localhost6.localdomain6>

On Wed, 2011-02-16 at 19:06 -0800, Dan Williams wrote:
> During initial scan libsas drivers start their phys and notify libsas
> with PORTE_BYTES_DMAED events as port links are established.  This
> notification in turn causes libsas to post DISCE_DISCOVER_DOMAIN events
> to the queue.  Calling scsi_flush_work() at the end of scan_finished
> guarantees that all preceding PORTE_BYTES_DMAED events have been
> registered in the queue, but it does not guarantee that the resulting
> DISCE_DISCOVER_DOMAIN events have been processed because
> flush_workqueue() explicitly avoids live-locking with incoming work.
> 
> Introduce sas_flush_discovery() to guarantee that all initial discovery
> events have completed.  It is called after the driver determines all
> initial PORTE_BYTES_DMAED events have had a chance to enter the queue.
> This does not cover BCNs that are generated during expander bring up,
> only the initial sas_discover_domain() event.

I think this is a workaround for an old bug in workqueue flushing (the
flush doesn't clean work it causes) ... I thought that's been fixed for
ages (well, months at least) ... have you verified that this is still a
problem?

James



  reply	other threads:[~2011-02-19  0:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-17  3:06 [PATCH] libsas: flush initial device discovery before completing ->scan_finished() Dan Williams
2011-02-19  0:02 ` James Bottomley [this message]
2011-02-19  1:32   ` Dan Williams

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=1298073759.3007.216.camel@mulgrave.site \
    --to=james.bottomley@suse.de \
    --cc=dan.j.williams@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=dmilburn@redhat.com \
    --cc=edmund.nadolski@intel.com \
    --cc=jacek.danecki@intel.com \
    --cc=jack_wang@usish.com \
    --cc=jeffrey.d.skirvin@intel.com \
    --cc=lindar_liu@usish.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=satyasrinivasp@hcl.in \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox