* [Question] Why PageReadahead is not migrated by migration code?
@ 2020-02-13 17:06 Yang Shi
2020-02-13 17:33 ` Matthew Wilcox
0 siblings, 1 reply; 3+ messages in thread
From: Yang Shi @ 2020-02-13 17:06 UTC (permalink / raw)
To: linux-mm, linux-kernel
Hi folks,
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?
Thanks,
Yang
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Question] Why PageReadahead is not migrated by migration code?
2020-02-13 17:06 [Question] Why PageReadahead is not migrated by migration code? Yang Shi
@ 2020-02-13 17:33 ` Matthew Wilcox
2020-02-13 18:04 ` Yang Shi
0 siblings, 1 reply; 3+ messages in thread
From: Matthew Wilcox @ 2020-02-13 17:33 UTC (permalink / raw)
To: Yang Shi; +Cc: linux-mm, linux-kernel
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Question] Why PageReadahead is not migrated by migration code?
2020-02-13 17:33 ` Matthew Wilcox
@ 2020-02-13 18:04 ` Yang Shi
0 siblings, 0 replies; 3+ messages in thread
From: Yang Shi @ 2020-02-13 18:04 UTC (permalink / raw)
To: Matthew Wilcox; +Cc: linux-mm, linux-kernel
On 2/13/20 9:33 AM, Matthew Wilcox wrote:
> 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.
Thanks. I tend to agree the slight performance loss might be hidden by
other things.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-02-13 18:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-13 17:06 [Question] Why PageReadahead is not migrated by migration code? Yang Shi
2020-02-13 17:33 ` Matthew Wilcox
2020-02-13 18:04 ` Yang Shi
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).