linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Zhaoyang Huang <huangzhaoyang@gmail.com>
Cc: "zhaoyang.huang" <zhaoyang.huang@unisoc.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	steve.kang@unisoc.com
Subject: Re: [PATCH] mm: fix hard lockup in __split_huge_page
Date: Tue, 18 Jun 2024 04:31:37 +0100	[thread overview]
Message-ID: <ZnD_mcxk_PCyWNmQ@casper.infradead.org> (raw)
In-Reply-To: <CAGWkznG2Ts0khArZ_X5EYKG7n9=HmcO8d16KVUZ+uQffEc3vrw@mail.gmail.com>

On Tue, Jun 18, 2024 at 11:27:12AM +0800, Zhaoyang Huang wrote:
> On Tue, Jun 18, 2024 at 11:19 AM Matthew Wilcox <willy@infradead.org> wrote:
> >
> > On Tue, Jun 18, 2024 at 10:09:26AM +0800, zhaoyang.huang wrote:
> > > Hard lockup[2] is reported which should be caused by recursive
> > > lock contention of lruvec->lru_lock[1] within __split_huge_page.
> > >
> > > [1]
> > > static void __split_huge_page(struct page *page, struct list_head *list,
> > >                 pgoff_t end, unsigned int new_order)
> > > {
> > >         /* lock lru list/PageCompound, ref frozen by page_ref_freeze */
> > > //1st lock here
> > >         lruvec = folio_lruvec_lock(folio);
> > >
> > >         for (i = nr - new_nr; i >= new_nr; i -= new_nr) {
> > >                 __split_huge_page_tail(folio, i, lruvec, list, new_order);
> > >                 /* Some pages can be beyond EOF: drop them from page cache */
> > >                 if (head[i].index >= end) {
> > >                         folio_put(tail);
> > >                             __page_cache_release
> > > //2nd lock here
> > >                                folio_lruvec_relock_irqsave
> >
> > Why doesn't lockdep catch this?
> It is reported by a regression test of the fix patch which aims at the
> find_get_entry livelock issue as below. I don't know the details of
> the kernel configuration.
> 
> https://lore.kernel.org/linux-mm/5f989315-e380-46aa-80d1-ce8608889e5f@marcinwanat.pl/

Go away.


  reply	other threads:[~2024-06-18  3:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-18  2:09 zhaoyang.huang
2024-06-18  3:19 ` Matthew Wilcox
2024-06-18  3:27   ` Zhaoyang Huang
2024-06-18  3:31     ` Matthew Wilcox [this message]
2024-06-18  3:42       ` Zhaoyang Huang

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=ZnD_mcxk_PCyWNmQ@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=huangzhaoyang@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=steve.kang@unisoc.com \
    --cc=zhaoyang.huang@unisoc.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