From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751581AbaDQO5L (ORCPT ); Thu, 17 Apr 2014 10:57:11 -0400 Received: from verein.lst.de ([213.95.11.211]:54208 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750919AbaDQO5I (ORCPT ); Thu, 17 Apr 2014 10:57:08 -0400 Date: Thu, 17 Apr 2014 16:57:05 +0200 From: Christoph Hellwig To: Ming Lei Cc: Christoph Hellwig , Jens Axboe , Matias Bjorling , Linux Kernel Mailing List , Linux SCSI List Subject: Re: [PATCH 5/7] blk-mq: initialize request on allocation 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 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@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.