linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: Michal Hocko <mhocko@suse.com>, Zi Yan <ziy@nvidia.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, Rik van Riel <riel@surriel.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/compaction: count pages and stop correctly during page isolation.
Date: Fri, 30 Oct 2020 15:55:45 +0100	[thread overview]
Message-ID: <e0f38829-8e47-62d7-924a-920096aae739@suse.cz> (raw)
In-Reply-To: <20201030144917.GK1478@dhcp22.suse.cz>

On 10/30/20 3:49 PM, Michal Hocko wrote:
> On Fri 30-10-20 10:35:43, Zi Yan wrote:
>> On 30 Oct 2020, at 9:36, Michal Hocko wrote:
>> 
>> > On Fri 30-10-20 08:20:50, Zi Yan wrote:
>> >> On 30 Oct 2020, at 5:43, Michal Hocko wrote:
>> >>
>> >>> [Cc Vlastimil]
>> >>>
>> >>> On Thu 29-10-20 16:04:35, Zi Yan wrote:
>> >>>
>> >>> Does thp_nr_pages work for __PageMovable pages?
>> >>
>> >> Yes. It is the same as compound_nr() but compiled
>> >> to 1 when THP is not enabled.
>> >
>> > I am sorry but I do not follow. First of all the implementation of the
>> > two is different and also I was asking about __PageMovable which should
>> > never be THP IIRC. Can they be compound though?
>> 
>> __PageMovable, non-lru movable pages, can be compound and thp_nr_page cannot
>> be used for it, since when THP is off, thp_nr_page will return the wrong number.
>> I got confused by its name, sorry.
> 
> OK, this matches my understanding. Good we are on the same page.
> 
>> But __PageMovable is irrelevant to this patch, since we are using
>> __isolate_lru_page to isolate pages. non-lru __PageMovable should not appear
>> after isolate_succes. thp_nr_pages can be used here.
> 
> But this is still not clear to me. __PageMovable pages are isolated by
> isolate_movable_page and then jump to isolate_succes. Does that somehow
> changes the nature of the page being compound or tat thp_nr_page would
> start working on those pages.

Agreed that page movable can appear after isolate_success. compound_nr() should 
work for both.
Note that too_many_isolated() doesn't see __PageMovable isolated pages, as they 
are not counted as NR_ISOLATED_FILE/NR_ISOLATED_ANON, AFAIK. So in that sense 
they are irrelevant to the bug at hand... for now.



  parent reply	other threads:[~2020-10-30 14:55 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-29 20:04 Zi Yan
2020-10-29 21:14 ` Yang Shi
2020-10-29 21:31   ` Zi Yan
2020-10-30  0:28     ` Andrew Morton
2020-10-30  1:20       ` Zi Yan
2020-10-30  9:43 ` Michal Hocko
2020-10-30 12:20   ` Zi Yan
2020-10-30 13:36     ` Michal Hocko
2020-10-30 14:35       ` Zi Yan
2020-10-30 14:49         ` Michal Hocko
2020-10-30 14:53           ` Zi Yan
2020-10-30 14:55           ` Vlastimil Babka [this message]
2020-10-30 18:33       ` Yang Shi
2020-10-30 18:39         ` Zi Yan
2020-10-30 18:55           ` Yang Shi
2020-11-02 13:03             ` Vlastimil Babka
2020-11-02 16:39               ` Yang Shi
2020-10-30 14:50 ` Vlastimil Babka
2020-10-30 15:18   ` Zi Yan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e0f38829-8e47-62d7-924a-920096aae739@suse.cz \
    --to=vbabka@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=riel@surriel.com \
    --cc=ziy@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox