Re: [External] Re: [PATCH] mm/memcontrol: Add the drop_cache interface for cgroup v2

2020-09-22 Thread Chunxin Zang
On Wed, Sep 23, 2020 at 3:57 AM Shakeel Butt wrote: > > On Tue, Sep 22, 2020 at 5:37 AM Chunxin Zang > wrote: > > > > On Tue, Sep 22, 2020 at 6:42 PM Chris Down wrote: > > > > > > Chunxin Zang writes: > > > >On Tue, Sep 22, 2020 at 5:51 PM Chris Down wrote: > > > >> > > > >> Chunxin Zang

Re: [External] Re: [PATCH] mm/memcontrol: Add the drop_cache interface for cgroup v2

2020-09-22 Thread Chunxin Zang
On Tue, Sep 22, 2020 at 8:43 PM Chris Down wrote: > > Chunxin Zang writes: > >Please forgive me for not being able to understand why setting > >memory.low for Type_A can solve the problem. > >In my scene, Type_A is the most important, so I will set 100G to memory.low. > >But 'memory.low' only

Re: [External] Re: [PATCH] mm/memcontrol: Add the drop_cache interface for cgroup v2

2020-09-22 Thread Shakeel Butt
On Tue, Sep 22, 2020 at 5:37 AM Chunxin Zang wrote: > > On Tue, Sep 22, 2020 at 6:42 PM Chris Down wrote: > > > > Chunxin Zang writes: > > >On Tue, Sep 22, 2020 at 5:51 PM Chris Down wrote: > > >> > > >> Chunxin Zang writes: > > >> >My usecase is that there are two types of services in one

Re: [External] Re: [PATCH] mm/memcontrol: Add the drop_cache interface for cgroup v2

2020-09-22 Thread Chris Down
Chunxin Zang writes: Please forgive me for not being able to understand why setting memory.low for Type_A can solve the problem. In my scene, Type_A is the most important, so I will set 100G to memory.low. But 'memory.low' only takes effect passively when the kernel is reclaiming memory. It

Re: [External] Re: [PATCH] mm/memcontrol: Add the drop_cache interface for cgroup v2

2020-09-22 Thread Chunxin Zang
On Tue, Sep 22, 2020 at 6:42 PM Chris Down wrote: > > Chunxin Zang writes: > >On Tue, Sep 22, 2020 at 5:51 PM Chris Down wrote: > >> > >> Chunxin Zang writes: > >> >My usecase is that there are two types of services in one server. They > >> >have difference > >> >priorities. Type_A has the

Re: [External] Re: [PATCH] mm/memcontrol: Add the drop_cache interface for cgroup v2

2020-09-22 Thread Chris Down
Chunxin Zang writes: On Tue, Sep 22, 2020 at 5:51 PM Chris Down wrote: Chunxin Zang writes: >My usecase is that there are two types of services in one server. They >have difference >priorities. Type_A has the highest priority, we need to ensure it's >schedule latency、I/O >latency、memory

Re: [External] Re: [PATCH] mm/memcontrol: Add the drop_cache interface for cgroup v2

2020-09-22 Thread Chunxin Zang
On Tue, Sep 22, 2020 at 5:51 PM Chris Down wrote: > > Chunxin Zang writes: > >My usecase is that there are two types of services in one server. They > >have difference > >priorities. Type_A has the highest priority, we need to ensure it's > >schedule latency、I/O > >latency、memory enough. Type_B

Re: [PATCH] mm/memcontrol: Add the drop_cache interface for cgroup v2

2020-09-22 Thread Michal Hocko
On Tue 22-09-20 16:06:31, Yafang Shao wrote: > On Tue, Sep 22, 2020 at 3:27 PM Michal Hocko wrote: [...] > > What is the latency triggered by the memory reclaim? It should be mostly > > a clean page cache right as drop_caches only drops clean pages. Or is > > this more about [id]cache? Do you

Re: [External] Re: [PATCH] mm/memcontrol: Add the drop_cache interface for cgroup v2

2020-09-22 Thread Chris Down
Chunxin Zang writes: My usecase is that there are two types of services in one server. They have difference priorities. Type_A has the highest priority, we need to ensure it's schedule latency、I/O latency、memory enough. Type_B has the lowest priority, we expect it will not affect Type_A when

Re: [External] Re: [PATCH] mm/memcontrol: Add the drop_cache interface for cgroup v2

2020-09-22 Thread Chunxin Zang
On Mon, Sep 21, 2020 at 7:05 PM Michal Hocko wrote: > > On Mon 21-09-20 18:55:40, Yafang Shao wrote: > > On Mon, Sep 21, 2020 at 4:12 PM Michal Hocko wrote: > > > > > > On Mon 21-09-20 16:02:55, zangchun...@bytedance.com wrote: > > > > From: Chunxin Zang > > > > > > > > In the cgroup v1, we

Re: [PATCH] mm/memcontrol: Add the drop_cache interface for cgroup v2

2020-09-22 Thread Yafang Shao
On Tue, Sep 22, 2020 at 3:27 PM Michal Hocko wrote: > > On Tue 22-09-20 12:20:52, Yafang Shao wrote: > > On Mon, Sep 21, 2020 at 7:36 PM Michal Hocko wrote: > > > > > > On Mon 21-09-20 19:23:01, Yafang Shao wrote: > > > > On Mon, Sep 21, 2020 at 7:05 PM Michal Hocko wrote: > > > > > > > > > >

Re: [PATCH] mm/memcontrol: Add the drop_cache interface for cgroup v2

2020-09-22 Thread Michal Hocko
On Tue 22-09-20 12:20:52, Yafang Shao wrote: > On Mon, Sep 21, 2020 at 7:36 PM Michal Hocko wrote: > > > > On Mon 21-09-20 19:23:01, Yafang Shao wrote: > > > On Mon, Sep 21, 2020 at 7:05 PM Michal Hocko wrote: > > > > > > > > On Mon 21-09-20 18:55:40, Yafang Shao wrote: > > > > > On Mon, Sep 21,

Re: [PATCH] mm/memcontrol: Add the drop_cache interface for cgroup v2

2020-09-21 Thread Yafang Shao
On Mon, Sep 21, 2020 at 7:36 PM Michal Hocko wrote: > > On Mon 21-09-20 19:23:01, Yafang Shao wrote: > > On Mon, Sep 21, 2020 at 7:05 PM Michal Hocko wrote: > > > > > > On Mon 21-09-20 18:55:40, Yafang Shao wrote: > > > > On Mon, Sep 21, 2020 at 4:12 PM Michal Hocko wrote: > > > > > > > > > >

Re: [PATCH] mm/memcontrol: Add the drop_cache interface for cgroup v2

2020-09-21 Thread Shakeel Butt
On Mon, Sep 21, 2020 at 1:05 AM wrote: > > From: Chunxin Zang > > In the cgroup v1, we have 'force_mepty' interface. This is very > useful for userspace to actively release memory. But the cgroup > v2 does not. > > This patch reuse cgroup v1's function, but have a new name for > the interface.

Re: [PATCH] mm/memcontrol: Add the drop_cache interface for cgroup v2

2020-09-21 Thread Michal Hocko
On Mon 21-09-20 19:23:01, Yafang Shao wrote: > On Mon, Sep 21, 2020 at 7:05 PM Michal Hocko wrote: > > > > On Mon 21-09-20 18:55:40, Yafang Shao wrote: > > > On Mon, Sep 21, 2020 at 4:12 PM Michal Hocko wrote: > > > > > > > > On Mon 21-09-20 16:02:55, zangchun...@bytedance.com wrote: > > > > >

Re: [PATCH] mm/memcontrol: Add the drop_cache interface for cgroup v2

2020-09-21 Thread Yafang Shao
On Mon, Sep 21, 2020 at 7:05 PM Michal Hocko wrote: > > On Mon 21-09-20 18:55:40, Yafang Shao wrote: > > On Mon, Sep 21, 2020 at 4:12 PM Michal Hocko wrote: > > > > > > On Mon 21-09-20 16:02:55, zangchun...@bytedance.com wrote: > > > > From: Chunxin Zang > > > > > > > > In the cgroup v1, we

Re: [PATCH] mm/memcontrol: Add the drop_cache interface for cgroup v2

2020-09-21 Thread Michal Hocko
On Mon 21-09-20 18:55:40, Yafang Shao wrote: > On Mon, Sep 21, 2020 at 4:12 PM Michal Hocko wrote: > > > > On Mon 21-09-20 16:02:55, zangchun...@bytedance.com wrote: > > > From: Chunxin Zang > > > > > > In the cgroup v1, we have 'force_mepty' interface. This is very > > > useful for userspace to

Re: [PATCH] mm/memcontrol: Add the drop_cache interface for cgroup v2

2020-09-21 Thread Yafang Shao
On Mon, Sep 21, 2020 at 4:12 PM Michal Hocko wrote: > > On Mon 21-09-20 16:02:55, zangchun...@bytedance.com wrote: > > From: Chunxin Zang > > > > In the cgroup v1, we have 'force_mepty' interface. This is very > > useful for userspace to actively release memory. But the cgroup > > v2 does not. >

Re: [PATCH] mm/memcontrol: Add the drop_cache interface for cgroup v2

2020-09-21 Thread Chris Down
Michal Hocko writes: On Mon 21-09-20 16:02:55, zangchun...@bytedance.com wrote: From: Chunxin Zang In the cgroup v1, we have 'force_mepty' interface. This is very useful for userspace to actively release memory. But the cgroup v2 does not. This patch reuse cgroup v1's function, but have a

Re: [PATCH] mm/memcontrol: Add the drop_cache interface for cgroup v2

2020-09-21 Thread Michal Hocko
On Mon 21-09-20 16:02:55, zangchun...@bytedance.com wrote: > From: Chunxin Zang > > In the cgroup v1, we have 'force_mepty' interface. This is very > useful for userspace to actively release memory. But the cgroup > v2 does not. > > This patch reuse cgroup v1's function, but have a new name for

[PATCH] mm/memcontrol: Add the drop_cache interface for cgroup v2

2020-09-21 Thread zangchunxin
From: Chunxin Zang In the cgroup v1, we have 'force_mepty' interface. This is very useful for userspace to actively release memory. But the cgroup v2 does not. This patch reuse cgroup v1's function, but have a new name for the interface. Because I think 'drop_cache' may be is easier to