* [merged] mm-page_allocc-clean-code-by-merging-two-functions.patch removed from -mm tree
@ 2020-10-14 21:02 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2020-10-14 21:02 UTC (permalink / raw)
To: akpm, mateusznosek0, mgorman, mm-commits, rppt
The patch titled
Subject: mm/page_alloc.c: clean code by merging two functions
has been removed from the -mm tree. Its filename was
mm-page_allocc-clean-code-by-merging-two-functions.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Mateusz Nosek <mateusznosek0@gmail.com>
Subject: mm/page_alloc.c: clean code by merging two functions
finalise_ac() is just 'epilogue' for 'prepare_alloc_pages'. Therefore
there is no need to keep them both so 'finalise_ac' content can be merged
into prepare_alloc_pages() code. It would make __alloc_pages_nodemask()
cleaner when it comes to readability.
Link: https://lkml.kernel.org/r/20200916110118.6537-1-mateusznosek0@gmail.com
Signed-off-by: Mateusz Nosek <mateusznosek0@gmail.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Mike Rapoport <rppt@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/page_alloc.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
--- a/mm/page_alloc.c~mm-page_allocc-clean-code-by-merging-two-functions
+++ a/mm/page_alloc.c
@@ -4838,12 +4838,6 @@ static inline bool prepare_alloc_pages(g
*alloc_flags = current_alloc_flags(gfp_mask, *alloc_flags);
- return true;
-}
-
-/* Determine whether to spread dirty pages and what the first usable zone */
-static inline void finalise_ac(gfp_t gfp_mask, struct alloc_context *ac)
-{
/* Dirty zone balancing only done in the fast path */
ac->spread_dirty_pages = (gfp_mask & __GFP_WRITE);
@@ -4854,6 +4848,8 @@ static inline void finalise_ac(gfp_t gfp
*/
ac->preferred_zoneref = first_zones_zonelist(ac->zonelist,
ac->highest_zoneidx, ac->nodemask);
+
+ return true;
}
/*
@@ -4882,8 +4878,6 @@ __alloc_pages_nodemask(gfp_t gfp_mask, u
if (!prepare_alloc_pages(gfp_mask, order, preferred_nid, nodemask, &ac, &alloc_mask, &alloc_flags))
return NULL;
- finalise_ac(gfp_mask, &ac);
-
/*
* Forbid the first pass from falling back to types that fragment
* memory until all local zones are considered.
_
Patches currently in -mm which might be from mateusznosek0@gmail.com are
mm-page_poisonc-replace-bool-variable-with-static-key.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-10-14 21:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-14 21:02 [merged] mm-page_allocc-clean-code-by-merging-two-functions.patch removed from -mm tree akpm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).