[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <868165e1-64d3-6241-c62e-19f0c91be64d@os.amperecomputing.com>
Date: Thu, 28 Sep 2023 10:35:17 -0700
From: Yang Shi <yang@...amperecomputing.com>
To: Andrew Morton <akpm@...ux-foundation.org>,
Suren Baghdasaryan <surenb@...gle.com>
Cc: hughd@...gle.com, willy@...radead.org, mhocko@...e.com,
vbabka@...e.cz, osalvador@...e.de, aquini@...hat.com,
kirill@...temov.name, rientjes@...gle.com, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH] mm: mempolicy: keep VMA walk if both MPOL_MF_STRICT and
MPOL_MF_MOVE are specified
On 9/28/23 9:38 AM, Andrew Morton wrote:
> On Wed, 27 Sep 2023 14:39:21 -0700 Suren Baghdasaryan <surenb@...gle.com> wrote:
>
>>>>> The code should conceptually do:
>>>>>
>>>>> if (MPOL_MF_MOVE|MOVEALL)
>>>>> scan all vmas
>>>>> try to migrate the existing pages
>>>>> return success
>>>>> else if (MPOL_MF_MOVE* | MPOL_MF_STRICT)
>>>>> scan all vmas
>>>>> try to migrate the existing pages
>>>>> return -EIO if unmovable or migration failed
>>>>> else /* MPOL_MF_STRICT alone */
>>>>> break early if meets unmovable and don't call mbind_range() at all
>>>>> else /* none of those flags */
>>>>> check the ranges in test_walk, EFAULT without mbind_range() if discontig.
>> With this change I think my temporary fix at
>> https://lore.kernel.org/all/20230918211608.3580629-1-surenb@google.com/
>> can be removed because we either scan all vmas (which means we locked
>> them all) or we break early and do not call mbind_range() at all (in
>> which case we don't need vmas to be locked).
Yes, we could just drop it. Keep the code not depend on the subtle
behavior of queue_pages_range() by keeping it is ok to me either. I
don't have strong preference.
> Thanks, I dropped "mm: lock VMAs skipped by a failed queue_pages_range()"
Thanks, Andrew.
Powered by blists - more mailing lists