[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACVXFVNR-FQPkN9j41GKtx71rXR=u0tJZbeWRf7c3setm5m+FA@mail.gmail.com>
Date: Thu, 17 Apr 2014 23:07:59 +0800
From: Ming Lei <tom.leiming@...il.com>
To: Christoph Hellwig <hch@....de>
Cc: Jens Axboe <axboe@...nel.dk>, Matias Bjorling <m@...rling.me>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux SCSI List <linux-scsi@...r.kernel.org>
Subject: Re: [PATCH 5/7] blk-mq: initialize request on allocation
On Thu, Apr 17, 2014 at 10:57 PM, Christoph Hellwig <hch@....de> wrote:
> On Thu, Apr 17, 2014 at 10:54:23PM +0800, Ming Lei wrote:
>> On Mon, Apr 14, 2014 at 4:30 PM, Christoph Hellwig <hch@....de> 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.
If so, it may be better to only initialize the rq->q in allocation
because Jens said 'It's done that way because of presumed cache
hotness on completion'.
Thanks,
--
Ming Lei
--
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