mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
fork: remove use of percpu_counter_sum_all
This effectively reverts the change made in commit f689054aac
("percpu_counter: add percpu_counter_sum_all interface") as the
race condition percpu_counter_sum_all() was invented to avoid is
now handled directly in percpu_counter_sum() and nobody needs to
care about summing racing with cpu unplug anymore.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
This commit is contained in:
committed by
Darrick J. Wong
parent
8b57b11cca
commit
7ba85fba47
@@ -755,11 +755,6 @@ static void check_mm(struct mm_struct *mm)
|
|||||||
for (i = 0; i < NR_MM_COUNTERS; i++) {
|
for (i = 0; i < NR_MM_COUNTERS; i++) {
|
||||||
long x = percpu_counter_sum(&mm->rss_stat[i]);
|
long x = percpu_counter_sum(&mm->rss_stat[i]);
|
||||||
|
|
||||||
if (likely(!x))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
/* Making sure this is not due to race with CPU offlining. */
|
|
||||||
x = percpu_counter_sum_all(&mm->rss_stat[i]);
|
|
||||||
if (unlikely(x))
|
if (unlikely(x))
|
||||||
pr_alert("BUG: Bad rss-counter state mm:%p type:%s val:%ld\n",
|
pr_alert("BUG: Bad rss-counter state mm:%p type:%s val:%ld\n",
|
||||||
mm, resident_page_types[i], x);
|
mm, resident_page_types[i], x);
|
||||||
|
Reference in New Issue
Block a user