[merged mm-stable] mm-remove-remnants-of-split_rss_counting.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The quilt patch titled
     Subject: mm: remove remnants of SPLIT_RSS_COUNTING
has been removed from the -mm tree.  Its filename was
     mm-remove-remnants-of-split_rss_counting.patch

This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: Mateusz Guzik <mjguzik@xxxxxxxxx>
Subject: mm: remove remnants of SPLIT_RSS_COUNTING
Date: Wed, 23 Aug 2023 19:05:56 +0200

The feature got retired in f1a7941243c1 ("mm: convert mm's rss stats into
percpu_counter"), but the patch failed to fully clean it up.

Link: https://lkml.kernel.org/r/20230823170556.2281747-1-mjguzik@xxxxxxxxx
Signed-off-by: Mateusz Guzik <mjguzik@xxxxxxxxx>
Acked-by: Shakeel Butt <shakeelb@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/exec.c          |    2 --
 include/linux/mm.h |    8 --------
 kernel/exit.c      |    4 ----
 kernel/fork.c      |    4 ----
 kernel/kthread.c   |    1 -
 mm/madvise.c       |    5 +----
 mm/memory.c        |    2 --
 7 files changed, 1 insertion(+), 25 deletions(-)

--- a/fs/exec.c~mm-remove-remnants-of-split_rss_counting
+++ a/fs/exec.c
@@ -986,8 +986,6 @@ static int exec_mmap(struct mm_struct *m
 	tsk = current;
 	old_mm = current->mm;
 	exec_mm_release(tsk, old_mm);
-	if (old_mm)
-		sync_mm_rss(old_mm);
 
 	ret = down_write_killable(&tsk->signal->exec_update_lock);
 	if (ret)
--- a/include/linux/mm.h~mm-remove-remnants-of-split_rss_counting
+++ a/include/linux/mm.h
@@ -2628,14 +2628,6 @@ static inline void setmax_mm_hiwater_rss
 		*maxrss = hiwater_rss;
 }
 
-#if defined(SPLIT_RSS_COUNTING)
-void sync_mm_rss(struct mm_struct *mm);
-#else
-static inline void sync_mm_rss(struct mm_struct *mm)
-{
-}
-#endif
-
 #ifndef CONFIG_ARCH_HAS_PTE_SPECIAL
 static inline int pte_special(pte_t pte)
 {
--- a/kernel/exit.c~mm-remove-remnants-of-split_rss_counting
+++ a/kernel/exit.c
@@ -539,7 +539,6 @@ static void exit_mm(void)
 	exit_mm_release(current, mm);
 	if (!mm)
 		return;
-	sync_mm_rss(mm);
 	mmap_read_lock(mm);
 	mmgrab_lazy_tlb(mm);
 	BUG_ON(mm != current->active_mm);
@@ -829,9 +828,6 @@ void __noreturn do_exit(long code)
 	io_uring_files_cancel();
 	exit_signals(tsk);  /* sets PF_EXITING */
 
-	/* sync mm's RSS info before statistics gathering */
-	if (tsk->mm)
-		sync_mm_rss(tsk->mm);
 	acct_update_integrals(tsk);
 	group_dead = atomic_dec_and_test(&tsk->signal->live);
 	if (group_dead) {
--- a/kernel/fork.c~mm-remove-remnants-of-split_rss_counting
+++ a/kernel/fork.c
@@ -2406,10 +2406,6 @@ __latent_entropy struct task_struct *cop
 	p->io_uring = NULL;
 #endif
 
-#if defined(SPLIT_RSS_COUNTING)
-	memset(&p->rss_stat, 0, sizeof(p->rss_stat));
-#endif
-
 	p->default_timer_slack_ns = current->timer_slack_ns;
 
 #ifdef CONFIG_PSI
--- a/kernel/kthread.c~mm-remove-remnants-of-split_rss_counting
+++ a/kernel/kthread.c
@@ -1469,7 +1469,6 @@ void kthread_unuse_mm(struct mm_struct *
 	 * clearing tsk->mm.
 	 */
 	smp_mb__after_spinlock();
-	sync_mm_rss(mm);
 	local_irq_disable();
 	tsk->mm = NULL;
 	membarrier_update_current_mm(NULL);
--- a/mm/madvise.c~mm-remove-remnants-of-split_rss_counting
+++ a/mm/madvise.c
@@ -746,11 +746,8 @@ static int madvise_free_pte_range(pmd_t
 		folio_mark_lazyfree(folio);
 	}
 
-	if (nr_swap) {
-		if (current->mm == mm)
-			sync_mm_rss(mm);
+	if (nr_swap)
 		add_mm_counter(mm, MM_SWAPENTS, nr_swap);
-	}
 	if (start_pte) {
 		arch_leave_lazy_mmu_mode();
 		pte_unmap_unlock(start_pte, ptl);
--- a/mm/memory.c~mm-remove-remnants-of-split_rss_counting
+++ a/mm/memory.c
@@ -471,8 +471,6 @@ static inline void add_mm_rss_vec(struct
 {
 	int i;
 
-	if (current->mm == mm)
-		sync_mm_rss(mm);
 	for (i = 0; i < NR_MM_COUNTERS; i++)
 		if (rss[i])
 			add_mm_counter(mm, i, rss[i]);
_

Patches currently in -mm which might be from mjguzik@xxxxxxxxx are





[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux