Re: [PATCH v2 07/11] mm/memory-failure: Convert memory_failure() to use a folio

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/10/2024 4:15 PM, Jane Chu wrote:

On 4/10/2024 3:21 AM, Oscar Salvador wrote:

On Mon, Apr 08, 2024 at 05:34:29PM -0700, Jane Chu wrote:
At this stage,  'p' is not expected to be a large page since a _refcount has been taken, right?  So is it reasonable to replace the "if (retry)" block
with a VM_BUG_ON warning?  otherwise, if 'p' became part of a different
large folio,  how to recover from here ?
We might have split the THP (if it was part of), but AFAICS
nothing stops the kernel to coallesce this page again into a new THP via e.g:
madvise(MADV_HUGEPAGE) ?

Good point, thanks!

Come to think of it a bit more, maybe the check could be

    if (folio_test_large(folio) || (folio != page_folio(p))) {

? Because, 'p' could have become part of a THP after shake_folio() and before folio_lock(), right?

thanks,

-jane



-jane






[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux