Re: [PATCH] mm: fix page cache convergence regression

From: Johannes Weiner
Date: Fri May 24 2019 - 13:42:06 EST


On Fri, May 24, 2019 at 09:04:17AM -0700, Matthew Wilcox wrote:
> On Fri, May 24, 2019 at 11:31:48AM -0400, Johannes Weiner wrote:
> > diff --git a/include/linux/xarray.h b/include/linux/xarray.h
> > index 0e01e6129145..cbbf76e4c973 100644
> > --- a/include/linux/xarray.h
> > +++ b/include/linux/xarray.h
> > @@ -292,6 +292,7 @@ struct xarray {
> > spinlock_t xa_lock;
> > /* private: The rest of the data structure is not to be used directly. */
> > gfp_t xa_flags;
> > + gfp_t xa_gfp;
> > void __rcu * xa_head;
> > };
>
> No. I'm willing to go for a xa_flag which says to use __GFP_ACCOUNT, but
> you can't add another element to the struct xarray.

Ok, we can generalize per-tree gfp flags later if necessary.

Below is the updated fix that uses an XA_FLAGS_ACCOUNT flag instead.

---