From: Andrew Morton <akpm@linux-foundation.org>
To: Nhat Pham <nphamcs@gmail.com>
Cc: hannes@cmpxchg.org, cerasuolodomenico@gmail.com,
yosryahmed@google.com, sjenning@redhat.com, ddstreet@ieee.org,
vitaly.wool@konsulko.com, mhocko@kernel.org,
roman.gushchin@linux.dev, shakeelb@google.com,
muchun.song@linux.dev, chrisl@kernel.org, linux-mm@kvack.org,
kernel-team@meta.com, linux-kernel@vger.kernel.org,
cgroups@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kselftest@vger.kernel.org, shuah@kernel.org
Subject: Re: [PATCH v6 2/6] memcontrol: allows mem_cgroup_iter() to check for onlineness
Date: Mon, 27 Nov 2023 13:42:59 -0800 [thread overview]
Message-ID: <20231127134259.67b69ab47f4f88c9751e5222@linux-foundation.org> (raw)
In-Reply-To: <20231127193703.1980089-3-nphamcs@gmail.com>
On Mon, 27 Nov 2023 11:36:59 -0800 Nhat Pham <nphamcs@gmail.com> wrote:
> The new zswap writeback scheme requires an online-only memcg hierarchy
> traversal. Add a new parameter to mem_cgroup_iter() to check for
> onlineness before returning.
I get a few build errors, perhaps because of patch timing issues...
mm/shrinker_debug.c: In function 'shrinker_debugfs_count_show':
mm/shrinker_debug.c:64:17: error: too few arguments to function 'mem_cgroup_iter'
64 | memcg = mem_cgroup_iter(NULL, NULL, NULL);
| ^~~~~~~~~~~~~~~
In file included from mm/shrinker_debug.c:7:
./include/linux/memcontrol.h:833:20: note: declared here
833 | struct mem_cgroup *mem_cgroup_iter(struct mem_cgroup *,
| ^~~~~~~~~~~~~~~
mm/shrinker_debug.c:89:27: error: too few arguments to function 'mem_cgroup_iter'
89 | } while ((memcg = mem_cgroup_iter(NULL, memcg, NULL)) != NULL);
| ^~~~~~~~~~~~~~~
./include/linux/memcontrol.h:833:20: note: declared here
833 | struct mem_cgroup *mem_cgroup_iter(struct mem_cgroup *,
| ^~~~~~~~~~~~~~~
mm/damon/sysfs-schemes.c: In function 'damon_sysfs_memcg_path_to_id':
mm/damon/sysfs-schemes.c:1594:22: error: too few arguments to function 'mem_cgroup_iter'
1594 | for (memcg = mem_cgroup_iter(NULL, NULL, NULL); memcg;
| ^~~~~~~~~~~~~~~
In file included from ./include/linux/damon.h:11,
from mm/damon/sysfs-common.h:8,
from mm/damon/sysfs-schemes.c:10:
./include/linux/memcontrol.h:833:20: note: declared here
833 | struct mem_cgroup *mem_cgroup_iter(struct mem_cgroup *,
| ^~~~~~~~~~~~~~~
mm/damon/sysfs-schemes.c:1595:33: error: too few arguments to function 'mem_cgroup_iter'
1595 | memcg = mem_cgroup_iter(NULL, memcg, NULL)) {
| ^~~~~~~~~~~~~~~
./include/linux/memcontrol.h:833:20: note: declared here
833 | struct mem_cgroup *mem_cgroup_iter(struct mem_cgroup *,
| ^~~~~~~~~~~~~~~
> --- a/include/linux/memcontrol.h
> +++ b/include/linux/memcontrol.h
> @@ -832,7 +832,7 @@ static inline void mem_cgroup_put(struct mem_cgroup *memcg)
>
> struct mem_cgroup *mem_cgroup_iter(struct mem_cgroup *,
> struct mem_cgroup *,
> - struct mem_cgroup_reclaim_cookie *);
> + struct mem_cgroup_reclaim_cookie *, bool online);
How many callsites do we expect to utilize the new `online' argument?
Few, I suspect.
How about we fix the above and simplify the patch by adding a new
mem_cgroup_iter_online() and make mem_cgroup_iter() a one-line wrapper
which calls that and adds the online=false argument?
I also saw this, didn't investigate.
drivers/android/binder_alloc.c: In function 'binder_update_page_range':
drivers/android/binder_alloc.c:237:34: error: too few arguments to function 'list_lru_del'
237 | on_lru = list_lru_del(&binder_alloc_lru, &page->lru);
next prev parent reply other threads:[~2023-11-27 21:43 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-27 19:36 [PATCH v6 0/6] workload-specific and memory pressure-driven zswap writeback Nhat Pham
2023-11-27 19:36 ` [PATCH v6 1/6] list_lru: allows explicit memcg and NUMA node selection Nhat Pham
2023-11-27 22:46 ` [PATCH v6 1/6] list_lru: allows explicit memcg and NUMA node selection (fix) Nhat Pham
2023-11-27 23:40 ` Nhat Pham
2023-11-27 19:36 ` [PATCH v6 2/6] memcontrol: allows mem_cgroup_iter() to check for onlineness Nhat Pham
2023-11-27 21:42 ` Andrew Morton [this message]
2023-11-27 22:34 ` Nhat Pham
2023-11-28 9:38 ` Michal Hocko
2023-11-28 16:53 ` Nhat Pham
2023-11-28 16:58 ` Nhat Pham
2023-11-29 9:18 ` Michal Hocko
2023-11-30 0:47 ` Nhat Pham
2023-11-27 19:37 ` [PATCH v6 3/6] zswap: make shrinking memcg-aware Nhat Pham
2023-11-27 19:37 ` [PATCH v6 4/6] mm: memcg: add per-memcg zswap writeback stat Nhat Pham
2023-11-27 19:37 ` [PATCH v6 5/6] selftests: cgroup: update per-memcg zswap writeback selftest Nhat Pham
2023-11-27 19:37 ` [PATCH v6 6/6] zswap: shrinks zswap pool based on memory pressure Nhat Pham
2023-11-27 21:00 ` Andrew Morton
2023-11-28 23:04 ` Nhat Pham
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=20231127134259.67b69ab47f4f88c9751e5222@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=cerasuolodomenico@gmail.com \
--cc=cgroups@vger.kernel.org \
--cc=chrisl@kernel.org \
--cc=ddstreet@ieee.org \
--cc=hannes@cmpxchg.org \
--cc=kernel-team@meta.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=muchun.song@linux.dev \
--cc=nphamcs@gmail.com \
--cc=roman.gushchin@linux.dev \
--cc=shakeelb@google.com \
--cc=shuah@kernel.org \
--cc=sjenning@redhat.com \
--cc=vitaly.wool@konsulko.com \
--cc=yosryahmed@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox