From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH 5/7] blk-mq: initialize request on allocation Date: Thu, 17 Apr 2014 16:57:05 +0200 Message-ID: <20140417145705.GA14787@lst.de> References: <1397464212-4454-1-git-send-email-hch@lst.de> <1397464212-4454-6-git-send-email-hch@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org To: Ming Lei Cc: Christoph Hellwig , Jens Axboe , Matias Bjorling , Linux Kernel Mailing List , Linux SCSI List List-Id: linux-scsi@vger.kernel.org On Thu, Apr 17, 2014 at 10:54:23PM +0800, Ming Lei wrote: > On Mon, Apr 14, 2014 at 4:30 PM, Christoph Hellwig wrote: > > If we want to share tag and request allocation between queues we cannot > > initialize the request at init/free time, but need to initialize it > > at allocation time as it might get used for different queues over its > > lifetime. > > Could you explain the use pattern? Looks you mean there are > still users of the tag/req even after it is freed, that looks a bit > weird since the tag/req can still be reallocated in another path > after it is freed. No difference in use pattern. But blk_rq_init initializes the rq->q field, and a request might get reused for a different queue.