2013-10-15 01:07:37

by Shaohua Li

[permalink] [raw]
Subject: [patch 0/4 v2] blk-mq: use percpu_ida to manage tags

Hi,
blk-mq and percpu_ida use similar algorithm to manage tags. The difference
is when a cpu can't allocate tags, blk-mq will use ipi to purge remote cpu
cache, while percpu-ida directly purges remote cpu cache. In practice, the
percpu-ida approach is much faster when we can't allocate enough for percpu
cache.

This patch makes blk-mq use percpu_ida to manage tags, this avoids some
duplicate code and has better performance as I mentioned. To test the patches,
rebase blk-mq tree to latest kernel first.

The v2 patch updated some log descriptions, fixed one issue Kent pointed out
and added performance data.

Thanks,
Shaohua


2013-10-15 15:16:39

by Jens Axboe

[permalink] [raw]
Subject: Re: [patch 0/4 v2] blk-mq: use percpu_ida to manage tags

On Tue, Oct 15 2013, Shaohua Li wrote:
> Hi,
> blk-mq and percpu_ida use similar algorithm to manage tags. The difference
> is when a cpu can't allocate tags, blk-mq will use ipi to purge remote cpu
> cache, while percpu-ida directly purges remote cpu cache. In practice, the
> percpu-ida approach is much faster when we can't allocate enough for percpu
> cache.
>
> This patch makes blk-mq use percpu_ida to manage tags, this avoids some
> duplicate code and has better performance as I mentioned. To test the patches,
> rebase blk-mq tree to latest kernel first.
>
> The v2 patch updated some log descriptions, fixed one issue Kent pointed out
> and added performance data.

Thanks, I've rebased it to 3.12-rc5 and applied the series.

--
Jens Axboe