* [PATCH -next] mm/memcontrol.c: remove unused private flag of memory.oom_control
@ 2022-04-21 12:27 ` Lu Jialin
0 siblings, 0 replies; 8+ messages in thread
From: Lu Jialin @ 2022-04-21 12:27 UTC (permalink / raw)
To: Johannes Weiner, Andrew Morton, Michal Hocko, Roman Gushchin,
Shakeel Butt
Cc: Lu Jialin, Wang Weiyang, cgroups, linux-kernel, linux-mm
There is no use for the private value, __OOM_TYPE and OOM notifier
OOM_CONTROL. Therefore remove them to make the code clean.
Signed-off-by: Lu Jialin <lujialin4@huawei.com>
---
mm/memcontrol.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 725f76723220..3aea256bfe7a 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -209,7 +209,6 @@ static struct move_charge_struct {
enum res_type {
_MEM,
_MEMSWAP,
- _OOM_TYPE,
_KMEM,
_TCP,
};
@@ -217,8 +216,6 @@ enum res_type {
#define MEMFILE_PRIVATE(x, val) ((x) << 16 | (val))
#define MEMFILE_TYPE(val) ((val) >> 16 & 0xffff)
#define MEMFILE_ATTR(val) ((val) & 0xffff)
-/* Used for OOM notifier */
-#define OOM_CONTROL (0)
/*
* Iteration constructs for visiting all cgroups (under a tree). If
@@ -4883,7 +4880,6 @@ static struct cftype mem_cgroup_legacy_files[] = {
.name = "oom_control",
.seq_show = mem_cgroup_oom_control_read,
.write_u64 = mem_cgroup_oom_control_write,
- .private = MEMFILE_PRIVATE(_OOM_TYPE, OOM_CONTROL),
},
{
.name = "pressure_level",
--
2.17.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH -next] mm/memcontrol.c: remove unused private flag of memory.oom_control
@ 2022-04-21 12:27 ` Lu Jialin
0 siblings, 0 replies; 8+ messages in thread
From: Lu Jialin @ 2022-04-21 12:27 UTC (permalink / raw)
To: Johannes Weiner, Andrew Morton, Michal Hocko, Roman Gushchin,
Shakeel Butt
Cc: Lu Jialin, Wang Weiyang, cgroups-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-mm-Bw31MaZKKs3YtjvyW6yDsg
There is no use for the private value, __OOM_TYPE and OOM notifier
OOM_CONTROL. Therefore remove them to make the code clean.
Signed-off-by: Lu Jialin <lujialin4-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
---
mm/memcontrol.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 725f76723220..3aea256bfe7a 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -209,7 +209,6 @@ static struct move_charge_struct {
enum res_type {
_MEM,
_MEMSWAP,
- _OOM_TYPE,
_KMEM,
_TCP,
};
@@ -217,8 +216,6 @@ enum res_type {
#define MEMFILE_PRIVATE(x, val) ((x) << 16 | (val))
#define MEMFILE_TYPE(val) ((val) >> 16 & 0xffff)
#define MEMFILE_ATTR(val) ((val) & 0xffff)
-/* Used for OOM notifier */
-#define OOM_CONTROL (0)
/*
* Iteration constructs for visiting all cgroups (under a tree). If
@@ -4883,7 +4880,6 @@ static struct cftype mem_cgroup_legacy_files[] = {
.name = "oom_control",
.seq_show = mem_cgroup_oom_control_read,
.write_u64 = mem_cgroup_oom_control_write,
- .private = MEMFILE_PRIVATE(_OOM_TYPE, OOM_CONTROL),
},
{
.name = "pressure_level",
--
2.17.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH -next] mm/memcontrol.c: remove unused private flag of memory.oom_control
@ 2022-04-21 14:17 ` Johannes Weiner
0 siblings, 0 replies; 8+ messages in thread
From: Johannes Weiner @ 2022-04-21 14:17 UTC (permalink / raw)
To: Lu Jialin
Cc: Andrew Morton, Michal Hocko, Roman Gushchin, Shakeel Butt,
Wang Weiyang, cgroups, linux-kernel, linux-mm
On Thu, Apr 21, 2022 at 08:27:55PM +0800, Lu Jialin wrote:
> There is no use for the private value, __OOM_TYPE and OOM notifier
> OOM_CONTROL. Therefore remove them to make the code clean.
>
> Signed-off-by: Lu Jialin <lujialin4@huawei.com>
Good catch, it's been unused since 347c4a874710 ("memcg: remove
cgroup_event->cft").
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH -next] mm/memcontrol.c: remove unused private flag of memory.oom_control
@ 2022-04-21 14:17 ` Johannes Weiner
0 siblings, 0 replies; 8+ messages in thread
From: Johannes Weiner @ 2022-04-21 14:17 UTC (permalink / raw)
To: Lu Jialin
Cc: Andrew Morton, Michal Hocko, Roman Gushchin, Shakeel Butt,
Wang Weiyang, cgroups-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-mm-Bw31MaZKKs3YtjvyW6yDsg
On Thu, Apr 21, 2022 at 08:27:55PM +0800, Lu Jialin wrote:
> There is no use for the private value, __OOM_TYPE and OOM notifier
> OOM_CONTROL. Therefore remove them to make the code clean.
>
> Signed-off-by: Lu Jialin <lujialin4-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
Good catch, it's been unused since 347c4a874710 ("memcg: remove
cgroup_event->cft").
Acked-by: Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH -next] mm/memcontrol.c: remove unused private flag of memory.oom_control
@ 2022-04-21 15:25 ` Shakeel Butt
0 siblings, 0 replies; 8+ messages in thread
From: Shakeel Butt @ 2022-04-21 15:25 UTC (permalink / raw)
To: Lu Jialin
Cc: Johannes Weiner, Andrew Morton, Michal Hocko, Roman Gushchin,
Wang Weiyang, Cgroups, LKML, Linux MM
On Thu, Apr 21, 2022 at 5:29 AM Lu Jialin <lujialin4@huawei.com> wrote:
>
> There is no use for the private value, __OOM_TYPE and OOM notifier
> OOM_CONTROL. Therefore remove them to make the code clean.
>
> Signed-off-by: Lu Jialin <lujialin4@huawei.com>
Acked-by: Shakeel Butt <shakeelb@google.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH -next] mm/memcontrol.c: remove unused private flag of memory.oom_control
@ 2022-04-21 15:25 ` Shakeel Butt
0 siblings, 0 replies; 8+ messages in thread
From: Shakeel Butt @ 2022-04-21 15:25 UTC (permalink / raw)
To: Lu Jialin
Cc: Johannes Weiner, Andrew Morton, Michal Hocko, Roman Gushchin,
Wang Weiyang, Cgroups, LKML, Linux MM
On Thu, Apr 21, 2022 at 5:29 AM Lu Jialin <lujialin4-hv44wF8Li93QT0dZR+AlfA@public.gmane.org> wrote:
>
> There is no use for the private value, __OOM_TYPE and OOM notifier
> OOM_CONTROL. Therefore remove them to make the code clean.
>
> Signed-off-by: Lu Jialin <lujialin4-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
Acked-by: Shakeel Butt <shakeelb-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH -next] mm/memcontrol.c: remove unused private flag of memory.oom_control
@ 2022-04-21 18:27 ` Roman Gushchin
0 siblings, 0 replies; 8+ messages in thread
From: Roman Gushchin @ 2022-04-21 18:27 UTC (permalink / raw)
To: Lu Jialin
Cc: Johannes Weiner, Andrew Morton, Michal Hocko, Shakeel Butt,
Wang Weiyang, cgroups, linux-kernel, linux-mm
On Thu, Apr 21, 2022 at 08:27:55PM +0800, Lu Jialin wrote:
> There is no use for the private value, __OOM_TYPE and OOM notifier
> OOM_CONTROL. Therefore remove them to make the code clean.
>
> Signed-off-by: Lu Jialin <lujialin4@huawei.com>
Acked-by: Roman Gushchin <roman.gushchin@linux.dev>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH -next] mm/memcontrol.c: remove unused private flag of memory.oom_control
@ 2022-04-21 18:27 ` Roman Gushchin
0 siblings, 0 replies; 8+ messages in thread
From: Roman Gushchin @ 2022-04-21 18:27 UTC (permalink / raw)
To: Lu Jialin
Cc: Johannes Weiner, Andrew Morton, Michal Hocko, Shakeel Butt,
Wang Weiyang, cgroups-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-mm-Bw31MaZKKs3YtjvyW6yDsg
On Thu, Apr 21, 2022 at 08:27:55PM +0800, Lu Jialin wrote:
> There is no use for the private value, __OOM_TYPE and OOM notifier
> OOM_CONTROL. Therefore remove them to make the code clean.
>
> Signed-off-by: Lu Jialin <lujialin4-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
Acked-by: Roman Gushchin <roman.gushchin-fxUVXftIFDnyG1zEObXtfA@public.gmane.org>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-04-21 18:28 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-21 12:27 [PATCH -next] mm/memcontrol.c: remove unused private flag of memory.oom_control Lu Jialin
2022-04-21 12:27 ` Lu Jialin
2022-04-21 14:17 ` Johannes Weiner
2022-04-21 14:17 ` Johannes Weiner
2022-04-21 15:25 ` Shakeel Butt
2022-04-21 15:25 ` Shakeel Butt
2022-04-21 18:27 ` Roman Gushchin
2022-04-21 18:27 ` Roman Gushchin
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.