[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJD7tkb9qTZRFUDGaBQM+nz2-HDpAJJ8SSB+rxgctBfC3K9mHw@mail.gmail.com>
Date: Fri, 3 Feb 2023 14:30:41 -0800
From: Yosry Ahmed <yosryahmed@...gle.com>
To: Matthew Wilcox <willy@...radead.org>
Cc: Alexander Viro <viro@...iv.linux.org.uk>,
"Darrick J. Wong" <djwong@...nel.org>,
Christoph Lameter <cl@...ux.com>,
David Rientjes <rientjes@...gle.com>,
Joonsoo Kim <iamjoonsoo.kim@....com>,
Vlastimil Babka <vbabka@...e.cz>,
Roman Gushchin <roman.gushchin@...ux.dev>,
Hyeonggon Yoo <42.hyeyoo@...il.com>,
Miaohe Lin <linmiaohe@...wei.com>,
David Hildenbrand <david@...hat.com>,
Johannes Weiner <hannes@...xchg.org>,
Peter Xu <peterx@...hat.com>, NeilBrown <neilb@...e.de>,
Shakeel Butt <shakeelb@...gle.com>,
Michal Hocko <mhocko@...nel.org>,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-xfs@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [RFC PATCH v1 1/2] mm: vmscan: refactor updating reclaimed pages
in reclaim_state
On Fri, Feb 3, 2023 at 8:22 AM Matthew Wilcox <willy@...radead.org> wrote:
>
> On Thu, Feb 02, 2023 at 11:32:28PM +0000, Yosry Ahmed wrote:
> > diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
> > index 54c774af6e1c..060079f1e966 100644
> > --- a/fs/xfs/xfs_buf.c
> > +++ b/fs/xfs/xfs_buf.c
> > @@ -286,8 +286,7 @@ xfs_buf_free_pages(
> > if (bp->b_pages[i])
> > __free_page(bp->b_pages[i]);
> > }
> > - if (current->reclaim_state)
> > - current->reclaim_state->reclaimed_slab += bp->b_page_count;
> > + report_freed_pages(bp->b_page_count);
>
> XFS can be built as a module
I didn't know that, thanks for pointing it out!
>
> > +++ b/mm/vmscan.c
> > @@ -204,6 +204,19 @@ static void set_task_reclaim_state(struct task_struct *task,
> > task->reclaim_state = rs;
> > }
> >
> > +/*
> > + * reclaim_report_freed_pages: report pages freed outside of LRU-based reclaim
> > + * @pages: number of pages freed
> > + *
> > + * If the current process is undergoing a reclaim operation,
> > + * increment the number of reclaimed pages by @pages.
> > + */
> > +void report_freed_pages(unsigned long pages)
> > +{
> > + if (current->reclaim_state)
> > + current->reclaim_state->reclaimed += pages;
> > +}
> > +
>
> report_free_pages is not EXPORT_SYMBOLed
Will do that for the next version, thanks!
Powered by blists - more mailing lists