All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Bean Huo (beanhuo)" <beanhuo@micron.com>
To: Bart Van Assche <bvanassche@acm.org>,
	Avri Altman <avri.altman@wdc.com>,
	"James E . J . Bottomley" <jejb@linux.vnet.ibm.com>
Cc: "Martin K . Petersen" <martin.petersen@oracle.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	Christoph Hellwig <hch@lst.de>,
	Yaniv Gardi <ygardi@codeaurora.org>,
	Subhash Jadavani <subhashj@codeaurora.org>,
	Stanley Chu <stanley.chu@mediatek.com>,
	Tomas Winkler <tomas.winkler@intel.com>
Subject: RE: [EXT] [PATCH RFC v2 4/5] ufs: Use blk_{get,put}_request() to allocate and free TMFs
Date: Tue, 5 Nov 2019 21:59:58 +0000	[thread overview]
Message-ID: <BN7PR08MB56844362FCF882E810B5017BDB7E0@BN7PR08MB5684.namprd08.prod.outlook.com> (raw)
In-Reply-To: <85c20718-fb3f-8a5e-6873-3f313b862b80@acm.org>


> On 11/5/19 5:50 AM, Bean Huo (beanhuo) wrote:
> >> -	wait_event(hba->tm_tag_wq, ufshcd_get_tm_free_slot(hba,
> >> &free_slot));
> >> +	req = blk_get_request(q, REQ_OP_DRV_OUT, BLK_MQ_REQ_RESERVED);
> >> +	req->end_io_data = &wait;
> >> +	free_slot = req->tag;
> >> +	WARN_ON_ONCE(free_slot < 0 || free_slot >= hba->nutmrs);
> >>   	ufshcd_hold(hba, false);
> >>
> > Understand now , you delete ufshcd_get_tm_free_slot(). Run a big circle to
> get a free_slot from reserved tags by calling blk_get_request().
> > But UFS data transfer queue depth is 32, not 32 + hba->nutmrs.  How to make
> sure we see the tag is consistent across block/scsi/ufs?
> 
> Hi Bean,
> 
> Please have a look at the blk_mq_get_tag() function in the block layer.
> The implementation of that function makes it clear that the tags with numbers
> [0 .. nr_reserved) are considered reserved tags and also that the tags with
> numbers [nr_reserved .. queue_depth) are considered regular tags. In other
> words, adding hba->nutmrs to can_queue does not increase the queue depth
> because the same number of tags are considered reserved tags.
> 
> Bart.

Hi, Bart
Yes, I saw that. And actually, task management requests and regular data transfer
Requests will be stored to different queues, and use different door-bell registers.
So as you said, to introduce a new tag set for TMFs is better.
Thanks,

//Bean

  reply	other threads:[~2019-11-05 22:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-05  0:42 [PATCH RFC v2 0/5] Simplify and optimize the UFS driver Bart Van Assche
2019-11-05  0:42 ` [PATCH RFC v2 1/5] Allow SCSI LLDs to reserve block layer tags Bart Van Assche
2019-11-05  0:42 ` [PATCH RFC v2 2/5] ufs: Use reserved tags for TMFs Bart Van Assche
2019-11-05  0:57   ` Christoph Hellwig
2019-11-05  1:03     ` Bart Van Assche
2019-11-05 11:58   ` [EXT] " Bean Huo (beanhuo)
2019-11-05 17:02     ` Bart Van Assche
2019-11-05 21:47       ` Bean Huo (beanhuo)
2019-11-05  0:42 ` [PATCH RFC v2 3/5] ufs: Avoid busy-waiting by eliminating tag conflicts Bart Van Assche
2019-11-05  0:42 ` [PATCH RFC v2 4/5] ufs: Use blk_{get,put}_request() to allocate and free TMFs Bart Van Assche
2019-11-05 13:50   ` [EXT] " Bean Huo (beanhuo)
2019-11-05 17:05     ` Bart Van Assche
2019-11-05 21:59       ` Bean Huo (beanhuo) [this message]
2019-11-05  0:42 ` [PATCH RFC v2 5/5] ufs: Simplify the clock scaling mechanism implementation Bart Van Assche

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=BN7PR08MB56844362FCF882E810B5017BDB7E0@BN7PR08MB5684.namprd08.prod.outlook.com \
    --to=beanhuo@micron.com \
    --cc=avri.altman@wdc.com \
    --cc=bvanassche@acm.org \
    --cc=hch@lst.de \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=stanley.chu@mediatek.com \
    --cc=subhashj@codeaurora.org \
    --cc=tomas.winkler@intel.com \
    --cc=ygardi@codeaurora.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.