damon.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Baolin Wang <baolin.wang@linux.alibaba.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: akpm@linux-foundation.org, torvalds@linux-foundation.org,
	sj@kernel.org, hannes@cmpxchg.org, mhocko@kernel.org,
	roman.gushchin@linux.dev, shakeelb@google.com,
	muchun.song@linux.dev, damon@lists.linux.dev,
	cgroups@vger.kernel.org, linux-mm@kvack.org,
Subject: Re: [PATCH 0/3] Some cleanups for page isolation
Date: Tue, 14 Feb 2023 14:49:51 +0800	[thread overview]
Message-ID: <a712d178-e524-fea7-a459-dd884956fc6b@linux.alibaba.com> (raw)
In-Reply-To: <Y+sTFqwMNAjDvxw3@casper.infradead.org>

On 2/14/2023 12:50 PM, Matthew Wilcox wrote:
> On Tue, Feb 14, 2023 at 11:18:05AM +0800, Baolin Wang wrote:
>> The page isolation functions did not return a boolean to indicate
>> success or not, instead it will return a negative error when failed
>> to isolate a page. So it's better to check the negative error explicitly
>> for isolation to make the code more clear per Linus's suggestion in [1].
> Only one caller of isolate_lru_page() or folio_isolate_lru() actually
> uses the errno.  And the errno can only be 0 or -EBUSY.  It'd be
> better to change the three functions to return bool and fix
> add_page_for_migration() to set the errno to -EBUSY itself.

Sounds reasonable to me, and I can change them to return bool in next 
version. Thanks.

      reply	other threads:[~2023-02-14  6:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-14  3:18 [PATCH 0/3] Some cleanups for page isolation Baolin Wang
2023-02-14  3:18 ` [PATCH 1/3] mm: check negative error of folio_isolate_lru() when failed to isolate a folio Baolin Wang
2023-02-14  3:18 ` [PATCH 2/3] mm: check negative error of isolate_lru_page() when failed to isolate a page Baolin Wang
2023-02-14  3:18 ` [PATCH 3/3] mm: mempolicy: check negative error of isolate_hugetlb() when failed to isolate a hugetlb Baolin Wang
2023-02-14  4:50 ` [PATCH 0/3] Some cleanups for page isolation Matthew Wilcox
2023-02-14  6:49   ` Baolin Wang [this message]

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:

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

  git send-email \
    --in-reply-to=a712d178-e524-fea7-a459-dd884956fc6b@linux.alibaba.com \
    --to=baolin.wang@linux.alibaba.com \
    --cc=akpm@linux-foundation.org \
    --cc=cgroups@vger.kernel.org \
    --cc=damon@lists.linux.dev \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=muchun.song@linux.dev \
    --cc=roman.gushchin@linux.dev \
    --cc=shakeelb@google.com \
    --cc=sj@kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=willy@infradead.org \


* 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;
as well as URLs for NNTP newsgroup(s).