From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org, willy@infradead.org,
akpm@linux-foundation.org
Subject: [merged mm-stable] memcg-convert-mem_cgroup_swap_full-to-take-a-folio.patch removed from -mm tree
Date: Mon, 03 Oct 2022 14:05:29 -0700 [thread overview]
Message-ID: <20221003210529.F0F1DC43470@smtp.kernel.org> (raw)
The quilt patch titled
Subject: memcg: convert mem_cgroup_swap_full() to take a folio
has been removed from the -mm tree. Its filename was
memcg-convert-mem_cgroup_swap_full-to-take-a-folio.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: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Subject: memcg: convert mem_cgroup_swap_full() to take a folio
Date: Fri, 2 Sep 2022 20:46:43 +0100
All callers now have a folio, so convert the function to take a folio.
Saves a couple of calls to compound_head().
Link: https://lkml.kernel.org/r/20220902194653.1739778-48-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
include/linux/swap.h | 4 ++--
mm/memcontrol.c | 6 +++---
mm/memory.c | 2 +-
mm/swapfile.c | 2 +-
mm/vmscan.c | 3 +--
5 files changed, 8 insertions(+), 9 deletions(-)
--- a/include/linux/swap.h~memcg-convert-mem_cgroup_swap_full-to-take-a-folio
+++ a/include/linux/swap.h
@@ -692,7 +692,7 @@ static inline void mem_cgroup_uncharge_s
}
extern long mem_cgroup_get_nr_swap_pages(struct mem_cgroup *memcg);
-extern bool mem_cgroup_swap_full(struct page *page);
+extern bool mem_cgroup_swap_full(struct folio *folio);
#else
static inline void mem_cgroup_swapout(struct folio *folio, swp_entry_t entry)
{
@@ -714,7 +714,7 @@ static inline long mem_cgroup_get_nr_swa
return get_nr_swap_pages();
}
-static inline bool mem_cgroup_swap_full(struct page *page)
+static inline bool mem_cgroup_swap_full(struct folio *folio)
{
return vm_swap_full();
}
--- a/mm/memcontrol.c~memcg-convert-mem_cgroup_swap_full-to-take-a-folio
+++ a/mm/memcontrol.c
@@ -7406,18 +7406,18 @@ long mem_cgroup_get_nr_swap_pages(struct
return nr_swap_pages;
}
-bool mem_cgroup_swap_full(struct page *page)
+bool mem_cgroup_swap_full(struct folio *folio)
{
struct mem_cgroup *memcg;
- VM_BUG_ON_PAGE(!PageLocked(page), page);
+ VM_BUG_ON_FOLIO(!folio_test_locked(folio), folio);
if (vm_swap_full())
return true;
if (cgroup_memory_noswap || !cgroup_subsys_on_dfl(memory_cgrp_subsys))
return false;
- memcg = page_memcg(page);
+ memcg = folio_memcg(folio);
if (!memcg)
return false;
--- a/mm/memory.c~memcg-convert-mem_cgroup_swap_full-to-take-a-folio
+++ a/mm/memory.c
@@ -3647,7 +3647,7 @@ static inline bool should_try_to_free_sw
{
if (!folio_test_swapcache(folio))
return false;
- if (mem_cgroup_swap_full(&folio->page) || (vma->vm_flags & VM_LOCKED) ||
+ if (mem_cgroup_swap_full(folio) || (vma->vm_flags & VM_LOCKED) ||
folio_test_mlocked(folio))
return true;
/*
--- a/mm/swapfile.c~memcg-convert-mem_cgroup_swap_full-to-take-a-folio
+++ a/mm/swapfile.c
@@ -148,7 +148,7 @@ static int __try_to_reclaim_swap(struct
if (folio_trylock(folio)) {
if ((flags & TTRS_ANYWAY) ||
((flags & TTRS_UNMAPPED) && !folio_mapped(folio)) ||
- ((flags & TTRS_FULL) && mem_cgroup_swap_full(&folio->page)))
+ ((flags & TTRS_FULL) && mem_cgroup_swap_full(folio)))
ret = folio_free_swap(folio);
folio_unlock(folio);
}
--- a/mm/vmscan.c~memcg-convert-mem_cgroup_swap_full-to-take-a-folio
+++ a/mm/vmscan.c
@@ -2047,8 +2047,7 @@ activate_locked_split:
activate_locked:
/* Not a candidate for swapping, so reclaim swap space. */
if (folio_test_swapcache(folio) &&
- (mem_cgroup_swap_full(&folio->page) ||
- folio_test_mlocked(folio)))
+ (mem_cgroup_swap_full(folio) || folio_test_mlocked(folio)))
folio_free_swap(folio);
VM_BUG_ON_FOLIO(folio_test_active(folio), folio);
if (!folio_test_mlocked(folio)) {
_
Patches currently in -mm which might be from willy@infradead.org are
reply other threads:[~2022-10-03 21:08 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=20221003210529.F0F1DC43470@smtp.kernel.org \
--to=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mm-commits@vger.kernel.org \
--cc=willy@infradead.org \
/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.