lkml.org 
[lkml]   [2019]   [Feb]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] page cache: Store only head pages in i_pages
On Thu, Feb 14, 2019 at 02:11:58PM -0800, Matthew Wilcox wrote:
> On Fri, Feb 15, 2019 at 01:08:10AM +0300, Kirill A. Shutemov wrote:
> > On Thu, Feb 14, 2019 at 01:17:57PM -0800, Matthew Wilcox wrote:
> > > On Thu, Feb 14, 2019 at 04:30:04PM +0300, Kirill A. Shutemov wrote:
> > > > - migrate_page_move_mapping() has to be converted too.
> > >
> > > I think that's as simple as:
> > >
> > > +++ b/mm/migrate.c
> > > @@ -465,7 +465,7 @@ int migrate_page_move_mapping(struct address_space *mapping,
> > >
> > > for (i = 1; i < HPAGE_PMD_NR; i++) {
> > > xas_next(&xas);
> > > - xas_store(&xas, newpage + i);
> > > + xas_store(&xas, newpage);
> > > }
> > > }
> > >
> > >
> > > or do you see something else I missed?
> >
> > Looks right to me.
> >
> > BTW, maybe some add syntax sugar from XArray side?
> >
> > Replace the loop and xas_store() before it with:
> >
> > xas_fill(&xas, newpage, 1UL << compound_order(newpage));
> >
> > or something similar?
>
> If we were keeping this code longterm, then yes, something like that
> would be great. I'm hoping this code is a mere stepping stone towards
> using multi-slot entries for the page cache.

Fair enough.

--
Kirill A. Shutemov

\
 
 \ /
  Last update: 2019-02-14 23:30    [W:0.062 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site