Re: [External] Re: [PATCH 4/7] mm: memcontrol: simplify lruvec_holds_page_lru_lock

2021-04-15 Thread Muchun Song
On Thu, Apr 15, 2021 at 1:49 AM Johannes Weiner wrote: > > On Wed, Apr 14, 2021 at 06:00:42PM +0800, Muchun Song wrote: > > On Wed, Apr 14, 2021 at 5:44 PM Michal Hocko wrote: > > > > > > On Tue 13-04-21 14:51:50, Muchun Song wrote: > > > > We already have a helper lruvec_memcg() to get the memcg

Re: [External] Re: [PATCH 4/7] mm: memcontrol: simplify lruvec_holds_page_lru_lock

2021-04-15 Thread Michal Hocko
On Wed 14-04-21 13:49:56, Johannes Weiner wrote: > On Wed, Apr 14, 2021 at 06:00:42PM +0800, Muchun Song wrote: > > On Wed, Apr 14, 2021 at 5:44 PM Michal Hocko wrote: > > > > > > On Tue 13-04-21 14:51:50, Muchun Song wrote: > > > > We already have a helper lruvec_memcg() to get the memcg from lru

Re: [External] Re: [PATCH 4/7] mm: memcontrol: simplify lruvec_holds_page_lru_lock

2021-04-14 Thread Johannes Weiner
On Wed, Apr 14, 2021 at 06:00:42PM +0800, Muchun Song wrote: > On Wed, Apr 14, 2021 at 5:44 PM Michal Hocko wrote: > > > > On Tue 13-04-21 14:51:50, Muchun Song wrote: > > > We already have a helper lruvec_memcg() to get the memcg from lruvec, we > > > do not need to do it ourselves in the lruvec_

Re: [External] Re: [PATCH 4/7] mm: memcontrol: simplify lruvec_holds_page_lru_lock

2021-04-14 Thread Muchun Song
On Wed, Apr 14, 2021 at 5:44 PM Michal Hocko wrote: > > On Tue 13-04-21 14:51:50, Muchun Song wrote: > > We already have a helper lruvec_memcg() to get the memcg from lruvec, we > > do not need to do it ourselves in the lruvec_holds_page_lru_lock(). So use > > lruvec_memcg() instead. And if mem_cg

Re: [PATCH 4/7] mm: memcontrol: simplify lruvec_holds_page_lru_lock

2021-04-14 Thread Michal Hocko
On Tue 13-04-21 14:51:50, Muchun Song wrote: > We already have a helper lruvec_memcg() to get the memcg from lruvec, we > do not need to do it ourselves in the lruvec_holds_page_lru_lock(). So use > lruvec_memcg() instead. And if mem_cgroup_disabled() returns false, the > page_memcg(page) (the LRU

Re: [PATCH 4/7] mm: memcontrol: simplify lruvec_holds_page_lru_lock

2021-04-13 Thread Roman Gushchin
On Tue, Apr 13, 2021 at 02:51:50PM +0800, Muchun Song wrote: > We already have a helper lruvec_memcg() to get the memcg from lruvec, we > do not need to do it ourselves in the lruvec_holds_page_lru_lock(). So use > lruvec_memcg() instead. And if mem_cgroup_disabled() returns false, the > page_memcg

Re: [PATCH 4/7] mm: memcontrol: simplify lruvec_holds_page_lru_lock

2021-04-13 Thread Shakeel Butt
On Mon, Apr 12, 2021 at 11:57 PM Muchun Song wrote: > > We already have a helper lruvec_memcg() to get the memcg from lruvec, we > do not need to do it ourselves in the lruvec_holds_page_lru_lock(). So use > lruvec_memcg() instead. And if mem_cgroup_disabled() returns false, the > page_memcg(page)