From: Matthew Wilcox <willy@infradead.org>
To: Peter Xu <peterx@redhat.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
David Hildenbrand <david@redhat.com>,
Mina Almasry <almasrymina@google.com>,
Andrew Morton <akpm@linux-foundation.org>,
Muchun Song <muchun.song@linux.dev>,
David Rientjes <rientjes@google.com>
Subject: Re: [PATCH 1/3] fixup! mm: always initialise folio->_deferred_list
Date: Thu, 18 Apr 2024 00:46:39 +0100 [thread overview]
Message-ID: <ZiBfX_kvVJQNsWCU@casper.infradead.org> (raw)
In-Reply-To: <20240417211836.2742593-2-peterx@redhat.com>
On Wed, Apr 17, 2024 at 05:18:34PM -0400, Peter Xu wrote:
> Current mm-unstable will hit this when running test_hugetlb_memcg. This
> fixes the crash for me.
>
> Signed-off-by: Peter Xu <peterx@redhat.com>
> ---
> mm/memcontrol.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index 1840ba4c355d..7703ced535a3 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -7529,6 +7529,7 @@ static void uncharge_folio(struct folio *folio, struct uncharge_gather *ug)
>
> VM_BUG_ON_FOLIO(folio_test_lru(folio), folio);
> VM_BUG_ON_FOLIO(folio_order(folio) > 1 &&
> + !folio_test_hugetlb(folio) &&
> !list_empty(&folio->_deferred_list), folio);
Hum. I thought we didn't get here for hugetlb folios. What
stacktrace did you get?
I'm basing it on comments like this:
/* hugetlb has its own memcg */
if (folio_test_hugetlb(folio)) {
if (lruvec) {
unlock_page_lruvec_irqrestore(lruvec, flags);
lruvec = NULL;
}
free_huge_folio(folio);
continue;
}
next prev parent reply other threads:[~2024-04-17 23:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-17 21:18 [PATCH 0/3] mm/hugetlb: Fix missing hugetlb_lock for memcg resv uncharge Peter Xu
2024-04-17 21:18 ` [PATCH 1/3] fixup! mm: always initialise folio->_deferred_list Peter Xu
2024-04-17 23:46 ` Matthew Wilcox [this message]
2024-04-18 1:39 ` Peter Xu
2024-04-17 21:18 ` [PATCH 2/3] mm/hugetlb: Fix missing hugetlb_lock for resv uncharge Peter Xu
2024-04-19 15:16 ` Mina Almasry
2024-04-17 21:18 ` [PATCH 3/3] mm/hugetlb: Assert hugetlb_lock in __hugetlb_cgroup_commit_charge Peter Xu
2024-04-19 15:03 ` Mina Almasry
2024-04-19 15:21 ` Peter Xu
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZiBfX_kvVJQNsWCU@casper.infradead.org \
--to=willy@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=almasrymina@google.com \
--cc=david@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=muchun.song@linux.dev \
--cc=peterx@redhat.com \
--cc=rientjes@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).