linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Yang Shi <yang.shi@linux.alibaba.com>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [Question] Why PageReadahead is not migrated by migration code?
Date: Thu, 13 Feb 2020 09:33:48 -0800	[thread overview]
Message-ID: <20200213173348.GS7778@bombadil.infradead.org> (raw)
In-Reply-To: <7691ab12-2e84-2531-f27d-2fae9045576d@linux.alibaba.com>

On Thu, Feb 13, 2020 at 09:06:58AM -0800, Yang Shi wrote:
> Recently we saw some PageReadahead related bugs, so I did a quick check
> about the use of PageReadahead. I just found the state is *not* migrated by
> migrate_page_states().
> 
> Since migrate_page() won't migrate writeback page, so if PageReadahead is
> set it should just mean PG_readahead rather than PG_reclaim. So, I didn't
> think of why it is not migrated.
> 
> I dig into the history a little bit, but the change in migration code is too
> overwhelming. But, it looks PG_readahead was added after migration was
> introduced. Is it just a simple omission?

It's probably more that it just doesn't matter enough.  If the Readahead
flag is missing on a page then the application will perform slightly worse
for a few pages as it ramps its readahead back up again.  On the other
hand, you just migrated its pages to a different NUMA node, so chances
are there are bigger perofmrance problems happening at this moment anyway.

I think we probably should migrate it, but I can understand why nobody's
noticed it before.


  reply	other threads:[~2020-02-13 17:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-13 17:06 [Question] Why PageReadahead is not migrated by migration code? Yang Shi
2020-02-13 17:33 ` Matthew Wilcox [this message]
2020-02-13 18:04   ` 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=20200213173348.GS7778@bombadil.infradead.org \
    --to=willy@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.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;
as well as URLs for NNTP newsgroup(s).