linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: Yang Shi <yang.shi@linux.alibaba.com>,
	mhocko@kernel.org, mgorman@techsingularity.net,
	akpm@linux-foundation.org
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [v2 PATCH 1/2] mm: mempolicy: make the behavior consistent when MPOL_MF_MOVE* and MPOL_MF_STRICT were specified
Date: Tue, 16 Jul 2019 10:47:38 +0200	[thread overview]
Message-ID: <0a57d280-a56c-ceef-282b-b9dec380c7c7@suse.cz> (raw)
In-Reply-To: <fb74d657-90cd-6667-f253-162c951f1b05@suse.cz>

On 7/16/19 10:12 AM, Vlastimil Babka wrote:
>> --- a/mm/mempolicy.c
>> +++ b/mm/mempolicy.c
>> @@ -429,11 +429,14 @@ static inline bool queue_pages_required(struct page *page,
>>  }
>>  
>>  /*
>> - * queue_pages_pmd() has three possible return values:
>> + * queue_pages_pmd() has four possible return values:
>> + * 2 - there is unmovable page, and MPOL_MF_MOVE* & MPOL_MF_STRICT were
>> + *     specified.
>>   * 1 - pages are placed on the right node or queued successfully.
>>   * 0 - THP was split.
> 
> I think if you renumbered these, it would be more consistent with
> queue_pages_pte_range() and simplify the code there.
> 0 - pages on right node/queued
> 1 - unmovable page with right flags specified
> 2 - THP split

Ah, alternatively you could add a boolean to struct queue_pages
accessible from mm_walk, set true to indicate that unmovable page has
been encountered, without propagating it back through special return values.


  reply	other threads:[~2019-07-16  8:47 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-22  0:20 [v2 PATCH 0/2] mm: mempolicy: fix mbind()'s inconsistent behavior for unmovable pages Yang Shi
2019-06-22  0:20 ` [v2 PATCH 1/2] mm: mempolicy: make the behavior consistent when MPOL_MF_MOVE* and MPOL_MF_STRICT were specified Yang Shi
2019-07-16  8:12   ` Vlastimil Babka
2019-07-16  8:47     ` Vlastimil Babka [this message]
2019-07-16 17:19       ` Yang Shi
2019-07-16 17:18     ` Yang Shi
2019-07-17 10:55       ` Vlastimil Babka
2019-07-17 16:51         ` Yang Shi
2019-06-22  0:20 ` [v2 PATCH 2/2] mm: mempolicy: handle vma with unmovable pages mapped correctly in mbind Yang Shi
2019-07-16 12:07   ` Vlastimil Babka
2019-07-16 17:28     ` Yang Shi
2019-07-17 18:23       ` Yang Shi
2019-07-17 18:39         ` Yang Shi
2019-07-17 18:50         ` Vlastimil Babka
2019-07-17 19:25           ` Yang Shi
2019-07-15 22:22 ` [v2 PATCH 0/2] mm: mempolicy: fix mbind()'s inconsistent behavior for unmovable pages Andrew Morton
2019-07-15 23:51   ` Yang Shi
2019-07-15 23:54     ` Yang Shi

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=0a57d280-a56c-ceef-282b-b9dec380c7c7@suse.cz \
    --to=vbabka@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=mhocko@kernel.org \
    --cc=yang.shi@linux.alibaba.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