From: Miaohe Lin <linmiaohe@huawei.com>
To: <akpm@linux-foundation.org>, <naoya.horiguchi@nec.com>
Cc: <linux-mm@kvack.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] mm: memory-failure: remove unneeded page state check in shake_page()
Date: Wed, 28 Jun 2023 09:51:33 +0800 [thread overview]
Message-ID: <df9eb561-2650-b58b-d39d-a4f4d90f1846@huawei.com> (raw)
In-Reply-To: <20230628014604.3432146-1-linmiaohe@huawei.com>
On 2023/6/28 9:46, Miaohe Lin wrote:
> Remove unneeded PageLRU(p) and is_free_buddy_page(p) check as slab caches
> are not shrunk now. This check can be added back when a lightweight range
> based shrinker is available.
>
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Sorry for make noise. Acked-by tag is missing. Will re-post one.
> ---
> v2:
> put TODO comment together with "if (PageSlab)" block per Naoya
> collect Acked-by tag per Naoya
> ---
> mm/memory-failure.c | 11 ++++-------
> 1 file changed, 4 insertions(+), 7 deletions(-)
>
> diff --git a/mm/memory-failure.c b/mm/memory-failure.c
> index 5b663eca1f29..66e7b3ceaf2d 100644
> --- a/mm/memory-failure.c
> +++ b/mm/memory-failure.c
> @@ -372,17 +372,14 @@ void shake_page(struct page *p)
> {
> if (PageHuge(p))
> return;
> -
> - if (!PageSlab(p)) {
> - lru_add_drain_all();
> - if (PageLRU(p) || is_free_buddy_page(p))
> - return;
> - }
> -
> /*
> * TODO: Could shrink slab caches here if a lightweight range-based
> * shrinker will be available.
> */
> + if (PageSlab(p))
> + return;
> +
> + lru_add_drain_all();
> }
> EXPORT_SYMBOL_GPL(shake_page);
>
>
next prev parent reply other threads:[~2023-06-28 1:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-28 1:46 Miaohe Lin
2023-06-28 1:51 ` Miaohe Lin [this message]
2023-06-28 1:49 Miaohe Lin
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=df9eb561-2650-b58b-d39d-a4f4d90f1846@huawei.com \
--to=linmiaohe@huawei.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=naoya.horiguchi@nec.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