From: Andrew Morton <akpm@linux-foundation.org>
To: Minchan Kim <minchan@kernel.org>
Cc: Suren Baghdasaryan <surenb@google.com>,
Matthew Wilcox <willy@infradead.org>,
linux-mm <linux-mm@kvack.org>,
LKML <linux-kernel@vger.kernel.org>,
Michal Hocko <mhocko@suse.com>, SeongJae Park <sj@kernel.org>
Subject: Re: [PATCH 1/3] mm: return the number of pages successfully paged out
Date: Tue, 17 Jan 2023 15:53:12 -0800 [thread overview]
Message-ID: <20230117155312.5464d01c2d639b1ac44f9330@linux-foundation.org> (raw)
In-Reply-To: <20230117231632.2734737-1-minchan@kernel.org>
I'm all hung up on the naming of everything.
> mm: return the number of pages successfully paged out
This is a vague title - MM is a big place. Perhaps "mm/vmscan: ..."
On Tue, 17 Jan 2023 15:16:30 -0800 Minchan Kim <minchan@kernel.org> wrote:
> The reclaim_pages MADV_PAGEOUT uses needs to return the number of
> pages paged-out successfully, not only the number of reclaimed pages
> in the operation because those pages paged-out successfully will be
> reclaimed easily at the memory pressure due to asynchronous writeback
> rotation(i.e., PG_reclaim with folio_rotate_reclaimable).
So... what does "paged out" actually mean? "writeback to backing
store was initiated"? From an application's point of view it means "no
longer in page tables needs a fault to get it back", no?
> This patch renames the reclaim_pages with paging_out(with hope that
"page_out" or "pageout" would be better than "paging_out".
> it's clear from operation point of view) and then adds a additional
> stat in reclaim_stat to represent the number of paged-out but kept
> in the memory for rotation on writeback completion.
So it's the number of pages against which we have initiated writeback.
Why not call it "nr_writeback" or similar?
> With that stat, madvise_pageout can know how many pages were paged-out
> successfully as well as reclaimed. The return value will be used for
> statistics in next patch.
>
> ...
>
> -unsigned long reclaim_pages(struct list_head *folio_list)
> +/*
> + * paging_out - reclaim clean pages and write dirty pages into storage
> + * @folio_list: pages for paging out
> + *
> + * paging_out() writes dirty pages to backing storage and/or reclaim
> + * clean pages from memory. Returns the number of written/reclaimed pages.
s/reclaim/reclaims/
"and/or" it vague - just "or", I think.
"written/reclaimed" is vague. "number of reclaimed pages plus the
number of pages against which writeback was initiated" is precise.
next prev parent reply other threads:[~2023-01-17 23:53 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-17 23:16 Minchan Kim
2023-01-17 23:16 ` [PATCH 2/3] mm: return boolean for deactivate_page Minchan Kim
2023-01-17 23:16 ` [PATCH 3/3] mm: add vmstat statistics for madvise_[cold|pageout] Minchan Kim
2023-01-18 9:11 ` Michal Hocko
2023-01-18 17:15 ` Minchan Kim
2023-01-18 17:27 ` Michal Hocko
2023-01-18 17:55 ` Minchan Kim
2023-01-18 21:13 ` Michal Hocko
2023-01-18 21:47 ` Minchan Kim
2023-01-17 23:53 ` Andrew Morton [this message]
2023-01-18 0:35 ` [PATCH 1/3] mm: return the number of pages successfully paged out Minchan Kim
2023-01-18 0:58 ` Matthew Wilcox
2023-01-18 1:49 ` Minchan Kim
2023-01-18 9:10 ` Michal Hocko
2023-01-18 17:09 ` Minchan Kim
2023-01-18 17:35 ` Michal Hocko
2023-01-18 18:07 ` Minchan Kim
2023-01-18 21:23 ` Michal Hocko
2023-01-18 22:27 ` Minchan Kim
2023-01-19 9:07 ` Michal Hocko
2023-01-19 21:15 ` Minchan Kim
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=20230117155312.5464d01c2d639b1ac44f9330@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=minchan@kernel.org \
--cc=sj@kernel.org \
--cc=surenb@google.com \
--cc=willy@infradead.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox