mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-26 18:43:33 -05:00
blkcg: s/blkg_rwstat_sum()/blkg_rwstat_total()/
Rename blkg_rwstat_sum() to blkg_rwstat_total(). sum will be used for summing up stats from multiple blkgs. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Vivek Goyal <vgoyal@redhat.com>
This commit is contained in:
parent
f427d90964
commit
4d5e80a760
2 changed files with 4 additions and 4 deletions
|
@ -461,14 +461,14 @@ static inline struct blkg_rwstat blkg_rwstat_read(struct blkg_rwstat *rwstat)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* blkg_rwstat_sum - read the total count of a blkg_rwstat
|
* blkg_rwstat_total - read the total count of a blkg_rwstat
|
||||||
* @rwstat: blkg_rwstat to read
|
* @rwstat: blkg_rwstat to read
|
||||||
*
|
*
|
||||||
* Return the total count of @rwstat regardless of the IO direction. This
|
* Return the total count of @rwstat regardless of the IO direction. This
|
||||||
* function can be called without synchronization and takes care of u64
|
* function can be called without synchronization and takes care of u64
|
||||||
* atomicity.
|
* atomicity.
|
||||||
*/
|
*/
|
||||||
static inline uint64_t blkg_rwstat_sum(struct blkg_rwstat *rwstat)
|
static inline uint64_t blkg_rwstat_total(struct blkg_rwstat *rwstat)
|
||||||
{
|
{
|
||||||
struct blkg_rwstat tmp = blkg_rwstat_read(rwstat);
|
struct blkg_rwstat tmp = blkg_rwstat_read(rwstat);
|
||||||
|
|
||||||
|
|
|
@ -536,7 +536,7 @@ static void cfqg_stats_set_start_empty_time(struct cfq_group *cfqg)
|
||||||
{
|
{
|
||||||
struct cfqg_stats *stats = &cfqg->stats;
|
struct cfqg_stats *stats = &cfqg->stats;
|
||||||
|
|
||||||
if (blkg_rwstat_sum(&stats->queued))
|
if (blkg_rwstat_total(&stats->queued))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -580,7 +580,7 @@ static void cfqg_stats_update_avg_queue_size(struct cfq_group *cfqg)
|
||||||
struct cfqg_stats *stats = &cfqg->stats;
|
struct cfqg_stats *stats = &cfqg->stats;
|
||||||
|
|
||||||
blkg_stat_add(&stats->avg_queue_size_sum,
|
blkg_stat_add(&stats->avg_queue_size_sum,
|
||||||
blkg_rwstat_sum(&stats->queued));
|
blkg_rwstat_total(&stats->queued));
|
||||||
blkg_stat_add(&stats->avg_queue_size_samples, 1);
|
blkg_stat_add(&stats->avg_queue_size_samples, 1);
|
||||||
cfqg_stats_update_group_wait_time(stats);
|
cfqg_stats_update_group_wait_time(stats);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue