lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <43db36cb-339c-4aa8-8940-1a197bd1001d@gentwo.org>
Date: Fri, 9 Aug 2024 14:09:10 -0700 (PDT)
From: "Christoph Lameter (Ampere)" <cl@...two.org>
To: David Hildenbrand <david@...hat.com>
cc: Dev Jain <dev.jain@....com>, akpm@...ux-foundation.org, shuah@...nel.org, 
    willy@...radead.org, ryan.roberts@....com, anshuman.khandual@....com, 
    catalin.marinas@....com, vbabka@...e.cz, mhocko@...e.com, 
    apopple@...dia.com, osalvador@...e.de, baolin.wang@...ux.alibaba.com, 
    dave.hansen@...ux.intel.com, will@...nel.org, baohua@...nel.org, 
    ioworker0@...il.com, gshan@...hat.com, mark.rutland@....com, 
    kirill.shutemov@...ux.intel.com, hughd@...gle.com, aneesh.kumar@...nel.org, 
    yang@...amperecomputing.com, peterx@...hat.com, broonie@...nel.org, 
    mgorman@...hsingularity.net, linux-arm-kernel@...ts.infradead.org, 
    linux-kernel@...r.kernel.org, linux-mm@...ck.org, 
    linux-kselftest@...r.kernel.org
Subject: Re: [PATCH 1/2] mm: Retry migration earlier upon refcount mismatch

On Fri, 9 Aug 2024, David Hildenbrand wrote:

>
> This really seems to be the latest point where we can "easily" back off and 
> unlock the source folio -- in this function :)
>
> I wonder if we should be smarter in the migrate_pages_batch() loop when we 
> start the actual migrations via migrate_folio_move(): if we detect that a 
> folio has unexpected references *and* it has waiters (PG_waiters), back off 
> then and retry the folio later. If it only has unexpected references, just 
> keep retrying: no waiters -> nobody is waiting for the lock to make progress.

Well just backoff ASAP if there are waiters detected anytime. A waiter 
would have increased the refcount. And a waiter will likely modify the page status soon. So 
push it to the end of the pages to be migrated to give it as much time 
as we can and check again later.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ