* + mm-vmpressure-replace-vmpressure_to_css-with-vmpressure_to_memcg.patch added to -mm tree
@ 2021-07-16 4:14 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2021-07-16 4:14 UTC (permalink / raw)
To: chris, hannes, mhocko, mm-commits, suhui, vdavydov.dev
The patch titled
Subject: mm/vmpressure: replace vmpressure_to_css() with vmpressure_to_memcg()
has been added to the -mm tree. Its filename is
mm-vmpressure-replace-vmpressure_to_css-with-vmpressure_to_memcg.patch
This patch should soon appear at
https://ozlabs.org/~akpm/mmots/broken-out/mm-vmpressure-replace-vmpressure_to_css-with-vmpressure_to_memcg.patch
and later at
https://ozlabs.org/~akpm/mmotm/broken-out/mm-vmpressure-replace-vmpressure_to_css-with-vmpressure_to_memcg.patch
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 and is updated
there every 3-4 working days
------------------------------------------------------
From: Hui Su <suhui@zeku.com>
Subject: mm/vmpressure: replace vmpressure_to_css() with vmpressure_to_memcg()
We can get memcg directly form vmpr instead of vmpr->memcg->css->memcg, so
add a new func helper vmpressure_to_memcg(). And no code will use
vmpressure_to_css(), so delete it.
Link: https://lkml.kernel.org/r/20210630112146.455103-1-suhui@zeku.com
Signed-off-by: Hui Su <suhui@zeku.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Acked-by: Chris Down <chris@chrisdown.name>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Vladimir Davydov <vdavydov.dev@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
include/linux/vmpressure.h | 2 +-
mm/memcontrol.c | 4 ++--
mm/vmpressure.c | 3 +--
3 files changed, 4 insertions(+), 5 deletions(-)
--- a/include/linux/vmpressure.h~mm-vmpressure-replace-vmpressure_to_css-with-vmpressure_to_memcg
+++ a/include/linux/vmpressure.h
@@ -37,7 +37,7 @@ extern void vmpressure_prio(gfp_t gfp, s
extern void vmpressure_init(struct vmpressure *vmpr);
extern void vmpressure_cleanup(struct vmpressure *vmpr);
extern struct vmpressure *memcg_to_vmpressure(struct mem_cgroup *memcg);
-extern struct cgroup_subsys_state *vmpressure_to_css(struct vmpressure *vmpr);
+extern struct mem_cgroup *vmpressure_to_memcg(struct vmpressure *vmpr);
extern int vmpressure_register_event(struct mem_cgroup *memcg,
struct eventfd_ctx *eventfd,
const char *args);
--- a/mm/memcontrol.c~mm-vmpressure-replace-vmpressure_to_css-with-vmpressure_to_memcg
+++ a/mm/memcontrol.c
@@ -256,9 +256,9 @@ struct vmpressure *memcg_to_vmpressure(s
return &memcg->vmpressure;
}
-struct cgroup_subsys_state *vmpressure_to_css(struct vmpressure *vmpr)
+struct mem_cgroup *vmpressure_to_memcg(struct vmpressure *vmpr)
{
- return &container_of(vmpr, struct mem_cgroup, vmpressure)->css;
+ return container_of(vmpr, struct mem_cgroup, vmpressure);
}
#ifdef CONFIG_MEMCG_KMEM
--- a/mm/vmpressure.c~mm-vmpressure-replace-vmpressure_to_css-with-vmpressure_to_memcg
+++ a/mm/vmpressure.c
@@ -74,8 +74,7 @@ static struct vmpressure *work_to_vmpres
static struct vmpressure *vmpressure_parent(struct vmpressure *vmpr)
{
- struct cgroup_subsys_state *css = vmpressure_to_css(vmpr);
- struct mem_cgroup *memcg = mem_cgroup_from_css(css);
+ struct mem_cgroup *memcg = vmpressure_to_memcg(vmpr);
memcg = parent_mem_cgroup(memcg);
if (!memcg)
_
Patches currently in -mm which might be from suhui@zeku.com are
mm-vmpressure-replace-vmpressure_to_css-with-vmpressure_to_memcg.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-07-16 4:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-16 4:14 + mm-vmpressure-replace-vmpressure_to_css-with-vmpressure_to_memcg.patch added to -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).