From: Vlastimil Babka <vbabka@suse.cz>
To: Huangzhaoyang <huangzhaoyang@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
Minchan Kim <minchan@kernel.org>,
Zhaoyang Huang <zhaoyang.huang@unisoc.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Johannes Weiner <hannes@cmpxchg.org>
Subject: Re: [PATCH] mm : bail out from psi memstall after submit_bio in swap_readpage
Date: Tue, 7 Sep 2021 14:02:59 +0200 [thread overview]
Message-ID: <79c08d1d-eef5-bc15-8186-7e3367b4ebe7@suse.cz> (raw)
In-Reply-To: <1631015968-9779-1-git-send-email-huangzhaoyang@gmail.com>
On 9/7/21 13:59, Huangzhaoyang wrote:
> From: Zhaoyang Huang <zhaoyang.huang@unisoc.com>
>
> It doesn't make sense to count IO time into psi memstall. Bail out after
> bio submitted.
Isn't that the point if psi, to observe real stalls, which include IO?
Anyway, CCing Johannes.
> Signed-off-by: Zhaoyang Huang <zhaoyang.huang@unisoc.com>
> ---
> mm/page_io.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/mm/page_io.c b/mm/page_io.c
> index c493ce9..1d131fc 100644
> --- a/mm/page_io.c
> +++ b/mm/page_io.c
> @@ -423,6 +423,7 @@ int swap_readpage(struct page *page, bool synchronous)
> count_vm_event(PSWPIN);
> bio_get(bio);
> qc = submit_bio(bio);
> + psi_memstall_leave(&pflags);
> while (synchronous) {
> set_current_state(TASK_UNINTERRUPTIBLE);
> if (!READ_ONCE(bio->bi_private))
> @@ -433,7 +434,7 @@ int swap_readpage(struct page *page, bool synchronous)
> }
> __set_current_state(TASK_RUNNING);
> bio_put(bio);
> -
> + return ret;
> out:
> psi_memstall_leave(&pflags);
> return ret;
>
next prev parent reply other threads:[~2021-09-07 12:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-07 11:59 Huangzhaoyang
2021-09-07 12:02 ` Vlastimil Babka [this message]
2021-09-07 12:15 ` Zhaoyang Huang
2021-09-07 13:26 ` Johannes Weiner
2021-09-08 3:35 ` Zhaoyang Huang
2021-09-08 11:36 ` Johannes Weiner
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=79c08d1d-eef5-bc15-8186-7e3367b4ebe7@suse.cz \
--to=vbabka@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=huangzhaoyang@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan@kernel.org \
--cc=zhaoyang.huang@unisoc.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox