* + zswap-make-shrinking-memcg-aware-fix.patch added to mm-unstable branch
@ 2023-11-29 21:54 Andrew Morton
0 siblings, 0 replies; 3+ messages in thread
From: Andrew Morton @ 2023-11-29 21:54 UTC (permalink / raw)
To: mm-commits, nphamcs, cerasuolodomenico, akpm, akpm
The patch titled
Subject: zswap-make-shrinking-memcg-aware-fix
has been added to the -mm mm-unstable branch. Its filename is
zswap-make-shrinking-memcg-aware-fix.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/zswap-make-shrinking-memcg-aware-fix.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: Andrew Morton <akpm@linux-foundation.org>
Subject: zswap-make-shrinking-memcg-aware-fix
Date: Wed Nov 29 01:50:40 PM PST 2023
temp build fixes
Cc: Domenico Cerasuolo <cerasuolodomenico@gmail.com>
Cc: Nhat Pham <nphamcs@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
include/linux/memcontrol.h | 5 +++++
mm/zswap.c | 3 +++
2 files changed, 8 insertions(+)
--- a/include/linux/memcontrol.h~zswap-make-shrinking-memcg-aware-fix
+++ a/include/linux/memcontrol.h
@@ -1165,6 +1165,11 @@ unsigned long mem_cgroup_soft_limit_recl
#define MEM_CGROUP_ID_SHIFT 0
+static inline struct mem_cgroup *obj_cgroup_memcg(struct obj_cgroup *objcg)
+{
+ return NULL;
+}
+
static inline struct mem_cgroup *folio_memcg(struct folio *folio)
{
return NULL;
--- a/mm/zswap.c~zswap-make-shrinking-memcg-aware-fix
+++ a/mm/zswap.c
@@ -32,6 +32,7 @@
#include <linux/mm_types.h>
#include <linux/page-flags.h>
#include <linux/swapops.h>
+#include <linux/memcontrol.h>
#include <linux/writeback.h>
#include <linux/pagemap.h>
#include <linux/workqueue.h>
@@ -822,7 +823,9 @@ static void shrink_worker(struct work_st
* Acquire an extra reference to the iterated memcg in case the
* original reference is dropped by the zswap offlining callback.
*/
+#ifdef CONFIG_MEMCG
css_get(&memcg->css);
+#endif
spin_unlock(&zswap_pools_lock);
ret = shrink_memcg(memcg);
_
Patches currently in -mm which might be from akpm@linux-foundation.org are
maintainers-add-andrew-morton-for-lib.patch
mm-memoryc-zap_pte_range-print-bad-swap-entry.patch
mm-shmem-fix-race-in-shmem_undo_range-w-thp-fix.patch
mm-add-folio_zero_tail-and-use-it-in-ext4-fix.patch
mm-add-folio_fill_tail-and-use-it-in-iomap-fix.patch
zswap-make-shrinking-memcg-aware-fix.patch
kernel-reboot-explicitly-notify-if-halt-occurred-instead-of-power-off-fix.patch
^ permalink raw reply [flat|nested] 3+ messages in thread
* + zswap-make-shrinking-memcg-aware-fix.patch added to mm-unstable branch
@ 2023-12-05 20:05 Andrew Morton
0 siblings, 0 replies; 3+ messages in thread
From: Andrew Morton @ 2023-12-05 20:05 UTC (permalink / raw)
To: mm-commits, yosryahmed, vitaly.wool, sjenning, shuah, shakeelb,
roman.gushchin, muchun.song, mhocko, hannes, ddstreet, chrisl,
cerasuolodomenico, bagasdotme, nphamcs, akpm
The patch titled
Subject: zswap: make shrinking memcg-aware (fix)
has been added to the -mm mm-unstable branch. Its filename is
zswap-make-shrinking-memcg-aware-fix.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/zswap-make-shrinking-memcg-aware-fix.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: Nhat Pham <nphamcs@gmail.com>
Subject: zswap: make shrinking memcg-aware (fix)
Date: Tue, 5 Dec 2023 11:54:19 -0800
Use the correct function for the onlineness check for the memcg selection,
and use mem_cgroup_iter_break() to break the iteration.
Link: https://lkml.kernel.org/r/20231205195419.2563217-1-nphamcs@gmail.com
Signed-off-by: Nhat Pham <nphamcs@gmail.com>
Suggested-by: Yosry Ahmed <yosryahmed@google.com>
Cc: Bagas Sanjaya <bagasdotme@gmail.com>
Cc: Chris Li <chrisl@kernel.org>
Cc: Dan Streetman <ddstreet@ieee.org>
Cc: Domenico Cerasuolo <cerasuolodomenico@gmail.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@kernel.org>
Cc: Muchun Song <muchun.song@linux.dev>
Cc: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Seth Jennings <sjenning@redhat.com>
Cc: Shakeel Butt <shakeelb@google.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Vitaly Wool <vitaly.wool@konsulko.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/zswap.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- a/mm/zswap.c~zswap-make-shrinking-memcg-aware-fix
+++ a/mm/zswap.c
@@ -834,9 +834,9 @@ static void shrink_worker(struct work_st
goto resched;
}
- if (!mem_cgroup_online(memcg)) {
+ if (!mem_cgroup_tryget_online(memcg)) {
/* drop the reference from mem_cgroup_iter() */
- mem_cgroup_put(memcg);
+ mem_cgroup_iter_break(NULL, memcg);
pool->next_shrink = NULL;
spin_unlock(&zswap_pools_lock);
@@ -985,7 +985,7 @@ static void zswap_pool_destroy(struct zs
list_lru_destroy(&pool->list_lru);
spin_lock(&zswap_pools_lock);
- mem_cgroup_put(pool->next_shrink);
+ mem_cgroup_iter_break(NULL, pool->next_shrink);
pool->next_shrink = NULL;
spin_unlock(&zswap_pools_lock);
_
Patches currently in -mm which might be from nphamcs@gmail.com are
list_lru-allows-explicit-memcg-and-numa-node-selection.patch
memcontrol-implement-mem_cgroup_tryget_online.patch
zswap-make-shrinking-memcg-aware-fix.patch
mm-memcg-add-per-memcg-zswap-writeback-stat-fix.patch
zswap-shrinks-zswap-pool-based-on-memory-pressure.patch
^ permalink raw reply [flat|nested] 3+ messages in thread
* + zswap-make-shrinking-memcg-aware-fix.patch added to mm-unstable branch
@ 2023-11-29 21:35 Andrew Morton
0 siblings, 0 replies; 3+ messages in thread
From: Andrew Morton @ 2023-11-29 21:35 UTC (permalink / raw)
To: mm-commits, nphamcs, cerasuolodomenico, akpm, akpm
The patch titled
Subject: zswap-make-shrinking-memcg-aware-fix
has been added to the -mm mm-unstable branch. Its filename is
zswap-make-shrinking-memcg-aware-fix.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/zswap-make-shrinking-memcg-aware-fix.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: Andrew Morton <akpm@linux-foundation.org>
Subject: zswap-make-shrinking-memcg-aware-fix
Date: Wed Nov 29 01:24:16 PM PST 2023
zswap.c needs memcontrol.h
Cc: Domenico Cerasuolo <cerasuolodomenico@gmail.com>
Cc: Nhat Pham <nphamcs@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/zswap.c | 1 +
1 file changed, 1 insertion(+)
--- a/mm/zswap.c~zswap-make-shrinking-memcg-aware-fix
+++ a/mm/zswap.c
@@ -29,6 +29,7 @@
#include <linux/zpool.h>
#include <crypto/acompress.h>
#include <linux/zswap.h>
+#include <linux/memcontrol.h>
#include <linux/mm_types.h>
#include <linux/page-flags.h>
#include <linux/swapops.h>
_
Patches currently in -mm which might be from akpm@linux-foundation.org are
maintainers-add-andrew-morton-for-lib.patch
mm-memoryc-zap_pte_range-print-bad-swap-entry.patch
mm-shmem-fix-race-in-shmem_undo_range-w-thp-fix.patch
mm-add-folio_zero_tail-and-use-it-in-ext4-fix.patch
mm-add-folio_fill_tail-and-use-it-in-iomap-fix.patch
zswap-make-shrinking-memcg-aware-fix.patch
kernel-reboot-explicitly-notify-if-halt-occurred-instead-of-power-off-fix.patch
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-12-05 20:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-29 21:54 + zswap-make-shrinking-memcg-aware-fix.patch added to mm-unstable branch Andrew Morton
-- strict thread matches above, loose matches on Subject: below --
2023-12-05 20:05 Andrew Morton
2023-11-29 21:35 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.