From: Matthew Wilcox <willy@infradead.org>
To: Yosry Ahmed <yosryahmed@google.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
"Darrick J. Wong" <djwong@kernel.org>,
Christoph Lameter <cl@linux.com>,
David Rientjes <rientjes@google.com>,
Joonsoo Kim <iamjoonsoo.kim@lge.com>,
Vlastimil Babka <vbabka@suse.cz>,
Roman Gushchin <roman.gushchin@linux.dev>,
Hyeonggon Yoo <42.hyeyoo@gmail.com>,
Miaohe Lin <linmiaohe@huawei.com>,
David Hildenbrand <david@redhat.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Peter Xu <peterx@redhat.com>, NeilBrown <neilb@suse.de>,
Shakeel Butt <shakeelb@google.com>,
Michal Hocko <mhocko@kernel.org>,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-xfs@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [RFC PATCH v1 1/2] mm: vmscan: refactor updating reclaimed pages in reclaim_state
Date: Fri, 3 Feb 2023 16:22:14 +0000 [thread overview]
Message-ID: <Y900tl+kRWoZac/T@casper.infradead.org> (raw)
In-Reply-To: <20230202233229.3895713-2-yosryahmed@google.com>
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
> +++ 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
next prev parent reply other threads:[~2023-02-03 16:22 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-02 23:32 [RFC PATCH v1 0/2] Ignore non-LRU-based reclaim in memcg reclaim Yosry Ahmed
2023-02-02 23:32 ` [RFC PATCH v1 1/2] mm: vmscan: refactor updating reclaimed pages in reclaim_state Yosry Ahmed
2023-02-03 10:57 ` kernel test robot
2023-02-03 10:57 ` kernel test robot
2023-02-03 16:22 ` Matthew Wilcox [this message]
2023-02-03 22:30 ` Yosry Ahmed
2023-02-02 23:32 ` [RFC PATCH v1 2/2] mm: vmscan: ignore non-LRU-based reclaim in memcg reclaim Yosry Ahmed
2023-02-03 0:00 ` [RFC PATCH v1 0/2] Ignore " Dave Chinner
2023-02-03 0:17 ` Yosry Ahmed
2023-02-03 15:11 ` Johannes Weiner
2023-02-03 15:28 ` Yosry Ahmed
2023-02-04 0:26 ` Shakeel Butt
2023-02-08 22:28 ` Yosry Ahmed
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=Y900tl+kRWoZac/T@casper.infradead.org \
--to=willy@infradead.org \
--cc=42.hyeyoo@gmail.com \
--cc=cl@linux.com \
--cc=david@redhat.com \
--cc=djwong@kernel.org \
--cc=hannes@cmpxchg.org \
--cc=iamjoonsoo.kim@lge.com \
--cc=linmiaohe@huawei.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-xfs@vger.kernel.org \
--cc=mhocko@kernel.org \
--cc=neilb@suse.de \
--cc=peterx@redhat.com \
--cc=rientjes@google.com \
--cc=roman.gushchin@linux.dev \
--cc=shakeelb@google.com \
--cc=vbabka@suse.cz \
--cc=viro@zeniv.linux.org.uk \
--cc=yosryahmed@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.