From: Michal Hocko Subject: Re: [PATCH 02/13] mm: use page_off_lru() Date: Fri, 18 Sep 2020 13:24:21 +0200 Message-ID: <20200918112421.GL28827@dhcp22.suse.cz> References: <20200918030051.650890-1-yuzhao@google.com> <20200918030051.650890-3-yuzhao@google.com> <20200918073700.GE28827@dhcp22.suse.cz> <20200918102713.GB1004594@google.com> Mime-Version: 1.0 Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1600428262; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=d9PDsqIPyVPgLukahRA3ETtD+nKIvQ1Ol6YmX3nuefQ=; b=FN30aRJ+ozUNW8fiN2FsyLCLrqgxgpM8NlMau1poGqllAwZcl0sFk4WIV0FXGuQOCDsHaB xt5dtdhGhw0LG9dsXVvBh0Eww6TzCSGW9Zmd4Zj+jJlGBwh4qNgpD+nmqrKsHRxQpwpjT5 fs8B3XBQGbuNi3wHzkHLM0Y0N7GQDXc= Content-Disposition: inline In-Reply-To: <20200918102713.GB1004594-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> List-ID: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Yu Zhao Cc: Andrew Morton , Alex Shi , Steven Rostedt , Ingo Molnar , Johannes Weiner , Vladimir Davydov , Roman Gushchin , Shakeel Butt , Chris Down , Yafang Shao , Vlastimil Babka , Huang Ying , Pankaj Gupta , Matthew Wilcox , Konstantin Khlebnikov , Minchan Kim , Jaewon Kim , cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On Fri 18-09-20 04:27:13, Yu Zhao wrote: > On Fri, Sep 18, 2020 at 09:37:00AM +0200, Michal Hocko wrote: [...] > And I have asked this before: why does 'the compound page situation' > even matter here? Perhaps if you could give a concrete example related > to the code change and help me understand your concern? Forgot to answer this part. The compound page concern is a misreading of the patch on my end. I have missed you are using page_off_lru in this (move_pages_to_lru) path and that you rely on release_pages to do the clean up on you. I still find it rather awkward that page_off_lru has such side effects but I am not deeply familiar with the reasoning behind so I will rather shut up now. [...] > > > @@ -1860,14 +1859,11 @@ static unsigned noinline_for_stack move_pages_to_lru(struct lruvec *lruvec, > > > lruvec = mem_cgroup_page_lruvec(page, pgdat); > > > > > > SetPageLRU(page); > > > - lru = page_lru(page); > > > - > > > add_page_to_lru_list(page, lruvec, lru); > > > > > > if (put_page_testzero(page)) { > > > __ClearPageLRU(page); > > > - __ClearPageActive(page); > > > - del_page_from_lru_list(page, lruvec, lru); > > > + del_page_from_lru_list(page, lruvec, page_off_lru(page)); > > > > > > if (unlikely(PageCompound(page))) { > > > spin_unlock_irq(&pgdat->lru_lock); > > > -- > > > 2.28.0.681.g6f77f65b4e-goog > > > > -- > > Michal Hocko > > SUSE Labs -- Michal Hocko SUSE Labs