LKML Archive mirror
 help / color / mirror / Atom feed
From: Khalid Aziz <khalid.aziz@oracle.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: David Hildenbrand <david@redhat.com>,
	Matthew Wilcox <willy@infradead.org>,
	John Hubbard <jhubbard@nvidia.com>,
	Steven Sistare <steven.sistare@oracle.com>,
	ying.huang@intel.com, mgorman@techsingularity.net,
	baolin.wang@linux.alibaba.com, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org, Khalid Aziz <khalid@kernel.org>
Subject: Re: [PATCH v4] mm, compaction: Skip all non-migratable pages during scan
Date: Fri, 9 Jun 2023 17:28:37 -0600	[thread overview]
Message-ID: <a6e84fce-31e8-bdd2-8ed9-de099f5e2230@oracle.com> (raw)
In-Reply-To: <20230609151111.bb7908254853a0879db07746@linux-foundation.org>

On 6/9/23 16:11, Andrew Morton wrote:
> On Tue, 30 May 2023 09:42:33 -0600 Khalid Aziz <khalid.aziz@oracle.com> wrote:
> 
>>> I completely agree that we should be careful with such mapcount vs. pagecount checks, and if we can use something
>>> better, let's use something *better*.
>>
>> When we have a reliable folio_maybe_dma_longterm_pinned() function, it will be better to call that instead of doing
>> refcount vs mapcount check. Until that better function to check for pinned pages is in place, may I propose that the
>> current patch fixes a customer problem though not optimally and is a good enough working solution. When a better
>> function is in place, page_has_extra_refs() function can be updated to rely on this other function instead of refcount
>> vs mapcount.
> 
> We seem rather stuck with this patch.  I think I'll drop it while we
> ponder a way forward.

Hi Andrew,

I would still recommend that we use this patch and fix the existing problem, unless there are objections from other 
people. This is not an optimal solution but it works and is similar to what kernel does elsewhere. When a better 
function to check pinned pages is available, we start using that function instead.

Thanks,
Khalid

  reply	other threads:[~2023-06-09 23:32 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-25 19:15 [PATCH v4] mm, compaction: Skip all non-migratable pages during scan Khalid Aziz
2023-05-25 19:58 ` Matthew Wilcox
2023-05-25 20:15   ` Steven Sistare
2023-05-25 20:45     ` Matthew Wilcox
2023-05-25 21:31       ` Matthew Wilcox
2023-05-26 15:44         ` Khalid Aziz
2023-05-26 16:44           ` Matthew Wilcox
2023-05-26 16:46             ` David Hildenbrand
2023-05-26 18:46               ` Matthew Wilcox
2023-05-26 18:50                 ` David Hildenbrand
2023-05-27  2:11                   ` John Hubbard
2023-05-27  3:18                     ` Matthew Wilcox
2023-05-28 23:49                       ` John Hubbard
2023-05-29  0:31                         ` Matthew Wilcox
2023-05-29  9:25                           ` David Hildenbrand
2023-05-30 15:42                             ` Khalid Aziz
2023-06-09 22:11                               ` Andrew Morton
2023-06-09 23:28                                 ` Khalid Aziz [this message]
2023-05-25 20:41   ` Khalid Aziz
2023-05-29  3:01 ` Huang, Ying

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=a6e84fce-31e8-bdd2-8ed9-de099f5e2230@oracle.com \
    --to=khalid.aziz@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=david@redhat.com \
    --cc=jhubbard@nvidia.com \
    --cc=khalid@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@techsingularity.net \
    --cc=steven.sistare@oracle.com \
    --cc=willy@infradead.org \
    --cc=ying.huang@intel.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).