On Thu, Apr 17, 2014 at 10:57 PM, Christoph Hellwig <hch@xxxxxx> 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@xxxxxx> 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-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html