Skip to content

Commit 7ba85fb

Browse files
Dave ChinnerDarrick J. Wong
authored andcommitted
fork: remove use of percpu_counter_sum_all
This effectively reverts the change made in commit f689054 ("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>
1 parent 8b57b11 commit 7ba85fb

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

kernel/fork.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -755,11 +755,6 @@ static void check_mm(struct mm_struct *mm)
755755
for (i = 0; i < NR_MM_COUNTERS; i++) {
756756
long x = percpu_counter_sum(&mm->rss_stat[i]);
757757

758-
if (likely(!x))
759-
continue;
760-
761-
/* Making sure this is not due to race with CPU offlining. */
762-
x = percpu_counter_sum_all(&mm->rss_stat[i]);
763758
if (unlikely(x))
764759
pr_alert("BUG: Bad rss-counter state mm:%p type:%s val:%ld\n",
765760
mm, resident_page_types[i], x);

0 commit comments

Comments
 (0)