From: Zhaoyang Huang <huangzhaoyang@gmail.com>
To: Dave Chinner <david@fromorbit.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
"zhaoyang.huang" <zhaoyang.huang@unisoc.com>,
Alex Shi <alexs@kernel.org>,
"Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>,
Hugh Dickins <hughd@google.com>,
Baolin Wang <baolin.wang@linux.alibaba.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
steve.kang@unisoc.com
Subject: Re: [PATCH 1/1] mm: protect xa split stuff under lruvec->lru_lock during migration
Date: Mon, 15 Apr 2024 09:50:19 +0800 [thread overview]
Message-ID: <CAGWkznHDpw5Sw5pAfB=TdgRqsf=bmwUQ6+kvvLht3=wumNNo6Q@mail.gmail.com> (raw)
In-Reply-To: <ZhxwIh2M8jr6IZaF@dread.disaster.area>
On Mon, Apr 15, 2024 at 8:09 AM Dave Chinner <david@fromorbit.com> wrote:
>
> On Sat, Apr 13, 2024 at 10:01:27AM +0800, Zhaoyang Huang wrote:
> > loop Dave, since he has ever helped set up an reproducer in
> > https://lore.kernel.org/linux-mm/20221101071721.GV2703033@dread.disaster.area/
> > @Dave Chinner , I would like to ask for your kindly help on if you can
> > verify this patch on your environment if convenient. Thanks a lot.
>
> I don't have the test environment from 18 months ago available any
> more. Also, I haven't seen this problem since that specific test
> environment tripped over the issue. Hence I don't have any way of
> confirming that the problem is fixed, either, because first I'd have
> to reproduce it...
Thanks for the information. I noticed that you reported another soft
lockup which is related to xas_load since NOV.2023. This patch is
supposed to be helpful for this. With regard to the version timing,
this commit is actually a revert of <mm/thp: narrow lru locking>
b6769834aac1d467fa1c71277d15688efcbb4d76 which is merged before v5.15.
For saving your time, a brief description below. IMO, b6769834aa
introduce a potential stall between freeze the folio's refcnt and
store it back to 2, which have the xas_load->folio_try_get_rcu loops
as livelock if it stalls the lru_lock's holder.
b6769834aa
split_huge_page_to_list
- spin_lock(lru_lock)
xas_split(&xas, folio,order)
folio_refcnt_freeze(folio, 1 + folio_nr_pages(folio0)
+ spin_lock(lru_lock)
xas_store(&xas, offset++, head+i)
page_ref_add(head, 2)
spin_unlock(lru_lock)
Sorry in advance if the above doesn't make sense, I am just a
developer who is also suffering from this bug and trying to fix it
>
> -Dave.
> --
> Dave Chinner
> david@fromorbit.com
next prev parent reply other threads:[~2024-04-15 1:50 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-12 6:43 zhaoyang.huang
2024-04-12 12:24 ` Matthew Wilcox
2024-04-13 7:10 ` Zhaoyang Huang
2024-04-12 21:34 ` Andrew Morton
2024-04-13 2:01 ` Zhaoyang Huang
2024-04-15 0:09 ` Dave Chinner
2024-04-15 1:50 ` Zhaoyang Huang [this message]
2024-05-20 19:42 ` Marcin Wanat
2024-05-21 0:58 ` Zhaoyang Huang
2024-05-21 1:00 ` Zhaoyang Huang
2024-05-21 15:47 ` Marcin Wanat
2024-05-22 5:37 ` Zhaoyang Huang
2024-05-22 10:13 ` Marcin Wanat
2024-05-27 8:22 ` Marcin Wanat
2024-05-27 8:53 ` Zhaoyang Huang
2024-06-14 3:31 ` Zhaoyang Huang
2024-05-30 8:48 ` Yafang Shao
2024-05-30 8:57 ` Zhaoyang Huang
2024-05-30 9:24 ` Yafang Shao
2024-05-31 6:17 ` Zhaoyang Huang
-- strict thread matches above, loose matches on Subject: below --
2023-10-03 13:48 [BUG] soft lockup in filemap_get_read_batch antal.nemes
2024-04-16 9:31 ` [PATCH 1/1] mm: protect xa split stuff under lruvec->lru_lock during migration 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='CAGWkznHDpw5Sw5pAfB=TdgRqsf=bmwUQ6+kvvLht3=wumNNo6Q@mail.gmail.com' \
--to=huangzhaoyang@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=alexs@kernel.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=david@fromorbit.com \
--cc=hughd@google.com \
--cc=kirill.shutemov@linux.intel.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