Re: [PATCH 00/13] blk-throttle: lockless bio processing for nothrottle rule group [V2]
From: Vivek Goyal
Date: Thu May 19 2011 - 15:59:09 EST
On Thu, May 19, 2011 at 03:38:18PM -0400, Vivek Goyal wrote:
> This is V2 of the patch. Changes from V1 are.
> - Dropped first patch of the series which has already been merged.
> - Fixed couple of white space warnings.
> Jens, I am sending this series on your both the ids. See if both produce
> Block throttling code takes request queue lock for every incoming bio
> (blk_throtl_bio()). This is true even if there are no throttle rules in
> the group. This is a common case for root cgroup where distributions
> will have throttling support compiled in but a vast majority of users
> will not be specifying throttling rule.
> This patch series tries to make bio processing lockless (no requeust
> queue lock), if there are no rules specified for the group. Once
> a bio is submitted, under rcu_read_lock() we search for the group,
> update the stats and release the rcu lock. request queue lock is taken
> only if there are throttling rules specified in the group.
> I have made some of the dispatch stats per cpu so that these can be updated
> without taking request queue lock.
Also forgot to mention that now throttling path does not take blkg->stat_lock
at all. Throttling updates only 3 stats and all these 3 stats have been
converted to per cpu, hence we got rid of the need of taking blkg->stat_lock
Divyesh, can you have a look at locking changes around stats and see if
you have any concerns.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/