lkml.org 
[lkml]   [2022]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RFC PATCH] mm: move xa forward when run across zombie page
On Fri, Oct 14, 2022 at 8:12 PM Matthew Wilcox <willy@infradead.org> wrote:
>
> On Fri, Oct 14, 2022 at 01:30:48PM +0800, zhaoyang.huang wrote:
> > From: Zhaoyang Huang <zhaoyang.huang@unisoc.com>
> >
> > Bellowing RCU stall is reported where kswapd traps in a live lock when shrink
> > superblock's inode list. The direct reason is zombie page keeps staying on the
> > xarray's slot and make the check and retry loop permanently. The root cause is unknown yet
> > and supposed could be an xa update without synchronize_rcu etc. I would like to
> > suggest skip this page to break the live lock as a workaround.
>
> No, the underlying bug should be fixed.
>
> > if (!folio || xa_is_value(folio))
> > return folio;
> >
> > - if (!folio_try_get_rcu(folio))
> > + if (!folio_try_get_rcu(folio)) {
> > + xas_advance(xas, folio->index + folio_nr_pages(folio) - 1);
> > goto reset;
> > + }
>
> You can't do this anyway. To call folio_nr_pages() and to look at
> folio->index, you must have a refcount on the page, and this is the
> path where we failed to get the refcount.
OK, could I move the xas like below?

+ if (!folio_try_get_rcu(folio)) {
+ xas_next_offset(xas);
goto reset;
+ }

\
 
 \ /
  Last update: 2022-10-17 07:35    [W:0.455 / U:0.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site