linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: chenridong <chenridong@huawei.com>
To: Andrew Morton <akpm@linux-foundation.org>,
	Chen Ridong <chenridong@huaweicloud.com>
Cc: <mhocko@suse.com>, <hannes@cmpxchg.org>, <yosryahmed@google.com>,
	<yuzhao@google.com>, <david@redhat.com>, <willy@infradead.org>,
	<ryan.roberts@arm.com>, <baohua@kernel.org>, <21cnbao@gmail.com>,
	<wangkefeng.wang@huawei.com>, <linux-mm@kvack.org>,
	<linux-kernel@vger.kernel.org>, <wangweiyang2@huawei.com>,
	<xieym_ict@hotmail.com>
Subject: Re: [PATCH v4 0/1] mm: vmascan: retry folios written back while isolated for traditional LRU
Date: Tue, 10 Dec 2024 14:42:07 +0800	[thread overview]
Message-ID: <f6872957-07ea-4d3a-b10c-a302cd291fda@huawei.com> (raw)
In-Reply-To: <20241209181341.fb579d7c0f9d76ae7854c4fa@linux-foundation.org>



On 2024/12/10 10:13, Andrew Morton wrote:
> On Mon,  9 Dec 2024 08:36:17 +0000 Chen Ridong <chenridong@huaweicloud.com> wrote:
> 
>> The commit 359a5e1416ca ("mm: multi-gen LRU: retry folios written back
>> while isolated") only fixed the issue for mglru. However, this issue
>> also exists in the traditional active/inactive LRU. Fix this issue
>> in the same way for active/inactive lru.
>>
>> What is fixed:
>> The page reclaim isolates a batch of folios from the tail of one of the
>> LRU lists and works on those folios one by one.  For a suitable
>> swap-backed folio, if the swap device is async, it queues that folio for
>> writeback.  After the page reclaim finishes an entire batch, it puts back
>> the folios it queued for writeback to the head of the original LRU list.
>>
>> In the meantime, the page writeback flushes the queued folios also by
>> batches.  Its batching logic is independent from that of the page reclaim.
>> For each of the folios it writes back, the page writeback calls
>> folio_rotate_reclaimable() which tries to rotate a folio to the tail.
>>
>> folio_rotate_reclaimable() only works for a folio after the page reclaim
>> has put it back.  If an async swap device is fast enough, the page
>> writeback can finish with that folio while the page reclaim is still
>> working on the rest of the batch containing it.  In this case, that folio
>> will remain at the head and the page reclaim will not retry it before
>> reaching there.
> 
> For a single patch series I think it's best to just make it a single
> patch!  No need for a [0/n]: just put all the info into the patch's
> changelog.
> 
> The patch doesn't apply to current development kernels.  Please check
> the mm-unstable branch of
> https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git/, or
> linux-next.
> 
> Please replace vmascan with vmscan in the title.

Thanks, Will update.

Best regards,
Ridong


      reply	other threads:[~2024-12-10  6:42 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-09  8:36 Chen Ridong
2024-12-09  8:36 ` [PATCH v4 1/1] " Chen Ridong
2024-12-10  4:54   ` Barry Song
2024-12-10  6:41     ` chenridong
2024-12-10  8:24       ` Barry Song
2024-12-10 12:11         ` chenridong
2024-12-12 23:17           ` Barry Song
2024-12-13  0:54             ` chenridong
2024-12-10  2:13 ` [PATCH v4 0/1] " Andrew Morton
2024-12-10  6:42   ` chenridong [this message]

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=f6872957-07ea-4d3a-b10c-a302cd291fda@huawei.com \
    --to=chenridong@huawei.com \
    --cc=21cnbao@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=baohua@kernel.org \
    --cc=chenridong@huaweicloud.com \
    --cc=david@redhat.com \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=ryan.roberts@arm.com \
    --cc=wangkefeng.wang@huawei.com \
    --cc=wangweiyang2@huawei.com \
    --cc=willy@infradead.org \
    --cc=xieym_ict@hotmail.com \
    --cc=yosryahmed@google.com \
    --cc=yuzhao@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