LKML Archive on
help / color / mirror / Atom feed
From: Vlastimil Babka <>
To: Sultan Alsawaf <>,
Subject: Re: Stuck looping on list_empty(list) in free_pcppages_bulk()
Date: Tue, 31 Aug 2021 18:51:23 +0200	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <YS1l83lmwEYXuQsY@sultan-box.localdomain>

On 8/31/21 01:12, Sultan Alsawaf wrote:
> With some more gdb digging, I found that the `count` variable was stored in %ESI
> at the time of the stall. According to register dump in the splat, %ESI was 7.
> It looks like, for some reason, the pcp count was 7 higher than the number of
> pages actually present in the pcp lists.
> I tried to find some way that this could happen, but the only thing I could
> think of was that maybe an allocation had both __GFP_RECLAIMABLE and
> __GFP_MOVABLE set in its gfp mask, in which case the rmqueue() call in
> get_page_from_freelist() would pass in a migratetype equal to MIGRATE_PCPTYPES
> and then pages could be added to an out-of-bounds pcp list while still
> incrementing the overall pcp count. This seems pretty unlikely though. As
> another side note, it looks like there's nothing stopping this from occurring;
> there's only a VM_WARN_ON() in gfp_migratetype() that checks if both bits are
> set.
> Any ideas on what may have happened here, or a link to a commit that may have
> fixed this issue in newer kernels, would be much appreciated.

Does the kernel have commit 88e8ac11d2ea3 backported? If not, and there were
memory hotplug operations happening, the infinite loop could happen. If that
commit was not backported, and instead 5c3ad2eb7104 was backported, possibly
there are more scenarios outside hotplug that can cause trouble.

> Thanks,
> Sultan

  parent reply	other threads:[~2021-08-31 16:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-30 23:12 Sultan Alsawaf
2021-08-31 12:44 ` Mel Gorman
2021-08-31 16:37   ` Sultan Alsawaf
2021-08-31 16:51 ` Vlastimil Babka [this message]
2021-08-31 16:58   ` Sultan Alsawaf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \ \
    --subject='Re: Stuck looping on list_empty(list) in free_pcppages_bulk()' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).