lkml.org 
[lkml]   [2023]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH V2 0/6] mm: page_alloc: freelist migratetype hygiene
    On 09/15/23 10:16, Johannes Weiner wrote:
    > On Thu, Sep 14, 2023 at 04:52:38PM -0700, Mike Kravetz wrote:
    > > In next-20230913, I started hitting the following BUG. Seems related
    > > to this series. And, if series is reverted I do not see the BUG.
    > >
    > > I can easily reproduce on a small 16G VM. kernel command line contains
    > > "hugetlb_free_vmemmap=on hugetlb_cma=4G". Then run the script,
    > > while true; do
    > > echo 4 > /sys/kernel/mm/hugepages/hugepages-1048576kB/nr_hugepages
    > > echo 4 > /sys/kernel/mm/hugepages/hugepages-1048576kB/demote
    > > echo 0 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
    > > done
    > >
    > > For the BUG below I believe it was the first (or second) 1G page creation from
    > > CMA that triggered: cma_alloc of 1G.
    > >
    > > Sorry, have not looked deeper into the issue.
    >
    > Thanks for the report, and sorry about the breakage!
    >
    > I was scratching my head at this:
    >
    > /* MIGRATE_ISOLATE page should not go to pcplists */
    > VM_BUG_ON_PAGE(is_migrate_isolate(mt), page);
    >
    > because there is nothing in page isolation that prevents setting
    > MIGRATE_ISOLATE on something that's on the pcplist already. So why
    > didn't this trigger before already?
    >
    > Then it clicked: it used to only check the *pcpmigratetype* determined
    > by free_unref_page(), which of course mustn't be MIGRATE_ISOLATE.
    >
    > Pages that get isolated while *already* on the pcplist are fine, and
    > are handled properly:
    >
    > mt = get_pcppage_migratetype(page);
    >
    > /* MIGRATE_ISOLATE page should not go to pcplists */
    > VM_BUG_ON_PAGE(is_migrate_isolate(mt), page);
    >
    > /* Pageblock could have been isolated meanwhile */
    > if (unlikely(isolated_pageblocks))
    > mt = get_pageblock_migratetype(page);
    >
    > So this was purely a sanity check against the pcpmigratetype cache
    > operations. With that gone, we can remove it.

    Thanks! That makes sense.

    Glad my testing (for something else) triggered it.
    --
    Mike Kravetz

    \
     
     \ /
      Last update: 2023-09-15 17:09    [W:4.405 / U:0.264 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site