mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Miaohe Lin <linmiaohe@huawei.com>
To: Minchan Kim <minchan@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: Jens Axboe <axboe@kernel.dk>, linux-mm <linux-mm@kvack.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Suren Baghdasaryan <surenb@google.com>,
	John Dias <joaodias@google.com>
Subject: Re: [PATCH] mm/madvise: pageout under plugging
Date: Fri, 10 Dec 2021 10:02:24 +0800	[thread overview]
Message-ID: <6d844eda-a55a-d90c-d8bc-364ac8b17690@huawei.com> (raw)
In-Reply-To: <20211210003019.1481269-1-minchan@kernel.org>

Hi:
On 2021/12/10 8:30, Minchan Kim wrote:
> Likewise shrink_lruvec[1], madvise_pageout could get the benefit
> from per-task block plug.
> 
> [1] 3da367c3e5fc, vmscan: add block plug for page reclaim

It seems there is a block plug in the caller do_madvise already. This one
might not be necessary for madvise.

Many thanks.

> Signed-off-by: Minchan Kim <minchan@kernel.org>
> ---
>  mm/vmscan.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/mm/vmscan.c b/mm/vmscan.c
> index fb9584641ac7..cf11113f6adb 100644
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -2556,6 +2556,7 @@ unsigned long reclaim_pages(struct list_head *page_list)
>  	struct reclaim_stat dummy_stat;
>  	struct page *page;
>  	unsigned int noreclaim_flag;
> +	struct blk_plug plug;
>  	struct scan_control sc = {
>  		.gfp_mask = GFP_KERNEL,
>  		.may_writepage = 1,
> @@ -2564,6 +2565,7 @@ unsigned long reclaim_pages(struct list_head *page_list)
>  		.no_demotion = 1,
>  	};
>  
> +	blk_start_plug(&plug);
>  	noreclaim_flag = memalloc_noreclaim_save();
>  
>  	while (!list_empty(page_list)) {
> @@ -2603,6 +2605,8 @@ unsigned long reclaim_pages(struct list_head *page_list)
>  	}
>  
>  	memalloc_noreclaim_restore(noreclaim_flag);
> +	blk_finish_plug(&plug);
> +
>  
>  	return nr_reclaimed;
>  }
> 


  reply	other threads:[~2021-12-10  2:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-10  0:30 Minchan Kim
2021-12-10  2:02 ` Miaohe Lin [this message]
2021-12-10  3:25   ` 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=6d844eda-a55a-d90c-d8bc-364ac8b17690@huawei.com \
    --to=linmiaohe@huawei.com \
    --cc=akpm@linux-foundation.org \
    --cc=axboe@kernel.dk \
    --cc=joaodias@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan@kernel.org \
    --cc=surenb@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®