Re: [PATCH v4] memcg: charge before adding to swapcache on swapin

2021-03-05 Thread Hugh Dickins
On Fri, 5 Mar 2021, Shakeel Butt wrote: > On Fri, Mar 5, 2021 at 1:26 PM Shakeel Butt wrote: > > > > Currently the kernel adds the page, allocated for swapin, to the > > swapcache before charging the page. This is fine but now we want a > > per-memcg swapcache stat which is essential for folks

Re: [PATCH v4] memcg: charge before adding to swapcache on swapin

2021-03-05 Thread Roman Gushchin
On Fri, Mar 05, 2021 at 01:26:39PM -0800, Shakeel Butt wrote: > Currently the kernel adds the page, allocated for swapin, to the > swapcache before charging the page. This is fine but now we want a > per-memcg swapcache stat which is essential for folks who wants to > transparently migrate from

Re: [PATCH v4] memcg: charge before adding to swapcache on swapin

2021-03-05 Thread Shakeel Butt
On Fri, Mar 5, 2021 at 1:26 PM Shakeel Butt wrote: > > Currently the kernel adds the page, allocated for swapin, to the > swapcache before charging the page. This is fine but now we want a > per-memcg swapcache stat which is essential for folks who wants to > transparently migrate from cgroup

[PATCH v4] memcg: charge before adding to swapcache on swapin

2021-03-05 Thread Shakeel Butt
Currently the kernel adds the page, allocated for swapin, to the swapcache before charging the page. This is fine but now we want a per-memcg swapcache stat which is essential for folks who wants to transparently migrate from cgroup v1's memsw to cgroup v2's memory and swap counters. In addition