2022-03-07 07:21:40

by Muchun Song

[permalink] [raw]
Subject: Re: [PATCH 15/16] mm/migration: fix possible do_pages_stat_array racing with memory offline

On Mon, Mar 7, 2022 at 1:22 PM Huang, Ying <[email protected]> wrote:
>
> Miaohe Lin <[email protected]> writes:
>
> > When follow_page peeks a page, the page could be reclaimed under heavy
> > memory pressure
>
> I don't think that memory pressure and reclaiming will be an issue.

I think he means a page first to be reclaimed then to be offline
could encounter this issue and reclaiming is a precondition.

Thanks.

>
> > and thus be offlined while it's still being used by the
> > do_pages_stat_array().
>
> "offline" seems a possible problem.


2022-03-07 09:14:05

by Huang, Ying

[permalink] [raw]
Subject: Re: [PATCH 15/16] mm/migration: fix possible do_pages_stat_array racing with memory offline

Muchun Song <[email protected]> writes:

> On Mon, Mar 7, 2022 at 1:22 PM Huang, Ying <[email protected]> wrote:
>>
>> Miaohe Lin <[email protected]> writes:
>>
>> > When follow_page peeks a page, the page could be reclaimed under heavy
>> > memory pressure
>>
>> I don't think that memory pressure and reclaiming will be an issue.
>
> I think he means a page first to be reclaimed then to be offline
> could encounter this issue and reclaiming is a precondition.

I don't think reclaiming is a precondition. It seems possible that the
virtual page is migrated, then the physical page is offlined.

Best Regards,
Huang, Ying

> Thanks.
>
>>
>> > and thus be offlined while it's still being used by the
>> > do_pages_stat_array().
>>
>> "offline" seems a possible problem.