From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org, ohkwon1043@gmail.com,
mgorman@techsingularity.net, lakroforce@gmail.com,
jsyoo5b@gmail.com, hannes@cmpxchg.org, dthex5d@gmail.com,
vvghjk1234@gmail.com, akpm@linux-foundation.org
Subject: + mm-page_alloc-cache-the-result-of-node_dirty_ok.patch added to mm-unstable branch
Date: Sat, 30 Apr 2022 11:39:20 -0700 [thread overview]
Message-ID: <20220430183921.16DCEC385AA@smtp.kernel.org> (raw)
The patch titled
Subject: mm/page_alloc: cache the result of node_dirty_ok()
has been added to the -mm mm-unstable branch. Its filename is
mm-page_alloc-cache-the-result-of-node_dirty_ok.patch
This patch should soon 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: Wonhyuk Yang <vvghjk1234@gmail.com>
Subject: mm/page_alloc: cache the result of node_dirty_ok()
To spread dirty pages, nodes are checked whether they have reached the
dirty limit using the expensive node_dirty_ok(). To reduce the frequency
of calling node_dirty_ok(), the last node that hit the dirty limit can be
cached.
Instead of caching the node, caching both the node and its node_dirty_ok()
status can reduce the number of calle to node_dirty_ok().
Link: https://lkml.kernel.org/r/20220430011032.64071-1-vvghjk1234@gmail.com
Signed-off-by: Wonhyuk Yang <vvghjk1234@gmail.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Donghyeok Kim <dthex5d@gmail.com>
Cc: JaeSang Yoo <jsyoo5b@gmail.com>
Cc: Jiyoup Kim <lakroforce@gmail.com>
Cc: Ohhoon Kwon <ohkwon1043@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/page_alloc.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
--- a/mm/page_alloc.c~mm-page_alloc-cache-the-result-of-node_dirty_ok
+++ a/mm/page_alloc.c
@@ -4021,7 +4021,8 @@ get_page_from_freelist(gfp_t gfp_mask, u
{
struct zoneref *z;
struct zone *zone;
- struct pglist_data *last_pgdat_dirty_limit = NULL;
+ struct pglist_data *last_pgdat = NULL;
+ bool last_pgdat_dirty_limit = false;
bool no_fallback;
retry:
@@ -4060,13 +4061,13 @@ retry:
* dirty-throttling and the flusher threads.
*/
if (ac->spread_dirty_pages) {
- if (last_pgdat_dirty_limit == zone->zone_pgdat)
- continue;
+ if (last_pgdat != zone->zone_pgdat) {
+ last_pgdat = zone->zone_pgdat;
+ last_pgdat_dirty_limit = node_dirty_ok(zone->zone_pgdat);
+ }
- if (!node_dirty_ok(zone->zone_pgdat)) {
- last_pgdat_dirty_limit = zone->zone_pgdat;
+ if (!last_pgdat_dirty_limit)
continue;
- }
}
if (no_fallback && nr_online_nodes > 1 &&
_
Patches currently in -mm which might be from vvghjk1234@gmail.com are
mm-page_alloc-cache-the-result-of-node_dirty_ok.patch
reply other threads:[~2022-04-30 18:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220430183921.16DCEC385AA@smtp.kernel.org \
--to=akpm@linux-foundation.org \
--cc=dthex5d@gmail.com \
--cc=hannes@cmpxchg.org \
--cc=jsyoo5b@gmail.com \
--cc=lakroforce@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@techsingularity.net \
--cc=mm-commits@vger.kernel.org \
--cc=ohkwon1043@gmail.com \
--cc=vvghjk1234@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.