All of lore.kernel.org
 help / color / mirror / Atom feed
* + delayacct-add-memory-reclaim-delay-in-get_page_from_freelist.patch added to mm-unstable branch
@ 2023-09-20 16:07 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2023-09-20 16:07 UTC (permalink / raw)
  To: mm-commits, wangyun, bsingharora, wenyuli, akpm


The patch titled
     Subject: delayacct: add memory reclaim delay in get_page_from_freelist
has been added to the -mm mm-unstable branch.  Its filename is
     delayacct-add-memory-reclaim-delay-in-get_page_from_freelist.patch

This patch will shortly appear at
     https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/delayacct-add-memory-reclaim-delay-in-get_page_from_freelist.patch

This patch will later appear in the mm-unstable branch at
    git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days

------------------------------------------------------
From: liwenyu <wenyuli@ex.bilibili.com>
Subject: delayacct: add memory reclaim delay in get_page_from_freelist
Date: Wed, 20 Sep 2023 17:38:49 +0800

The current memory reclaim delay statistics only count the direct memory
reclaim of the task in do_try_to_free_pages().  In systems with NUMA open,
some tasks occasionally experience slower response times, but the total
count of reclaim does not increase, using ftrace can show that
node_reclaim has occurred.

The memory reclaim occurring in get_page_from_freelist() is also due to
heavy memory load.  To get the impact of tasks in memory reclaim, this
patch adds the statistics of the memory reclaim delay statistics for
__node_reclaim().

Link: https://lkml.kernel.org/r/181C946095F0252B+7cc60eca-1abf-4502-aad3-ffd8ef89d910@ex.bilibili.com
Signed-off-by: Wen Yu Li <wenyuli@ex.bilibili.com>
Cc: Balbir Singh <bsingharora@gmail.com>
Cc: <wangyun@bilibili.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/vmscan.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/mm/vmscan.c~delayacct-add-memory-reclaim-delay-in-get_page_from_freelist
+++ a/mm/vmscan.c
@@ -7350,6 +7350,7 @@ static int __node_reclaim(struct pglist_
 
 	cond_resched();
 	psi_memstall_enter(&pflags);
+	delayacct_freepages_start();
 	fs_reclaim_acquire(sc.gfp_mask);
 	/*
 	 * We need to be able to allocate from the reserves for RECLAIM_UNMAP
@@ -7372,6 +7373,7 @@ static int __node_reclaim(struct pglist_
 	memalloc_noreclaim_restore(noreclaim_flag);
 	fs_reclaim_release(sc.gfp_mask);
 	psi_memstall_leave(&pflags);
+	delayacct_freepages_end();
 
 	trace_mm_vmscan_node_reclaim_end(sc.nr_reclaimed);
 
_

Patches currently in -mm which might be from wenyuli@ex.bilibili.com are

delayacct-add-memory-reclaim-delay-in-get_page_from_freelist.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-09-20 16:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-20 16:07 + delayacct-add-memory-reclaim-delay-in-get_page_from_freelist.patch added to mm-unstable branch Andrew Morton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.