From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org,kasong@tencent.com,hughd@google.com,baolin.wang@linux.alibaba.com,liuyun01@kylinos.cn,akpm@linux-foundation.org
Subject: [merged mm-stable] mm-shmem-remove-unused-entry_order-after-large-swapin-rework.patch removed from -mm tree
Date: Sun, 21 Sep 2025 14:26:19 -0700 [thread overview]
Message-ID: <20250921212620.23C1CC4CEE7@smtp.kernel.org> (raw)
The quilt patch titled
Subject: mm/shmem: remove unused entry_order after large swapin rework
has been removed from the -mm tree. Its filename was
mm-shmem-remove-unused-entry_order-after-large-swapin-rework.patch
This patch was dropped because it was merged into the mm-stable branch
of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Jackie Liu <liuyun01@kylinos.cn>
Subject: mm/shmem: remove unused entry_order after large swapin rework
Date: Mon, 8 Sep 2025 14:26:14 +0800
After commit 93c0476e7057 ("mm/shmem, swap: rework swap entry and index
calculation for large swapin"), xas_get_order() will never return a
non-zero value for `entry_order` in shmem_split_large_entry(). As a
result, the local variable `entry_order` is effectively unused.
Clean up the code by removing `entry_order` and directly using
`cur_order`. This change is purely a refactor and has no functional
impact.
No functional change intended.
Link: https://lkml.kernel.org/r/20250908062614.89880-1-liu.yun@linux.dev
Signed-off-by: Jackie Liu <liuyun01@kylinos.cn>
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Kairui Song <kasong@tencent.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/shmem.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
--- a/mm/shmem.c~mm-shmem-remove-unused-entry_order-after-large-swapin-rework
+++ a/mm/shmem.c
@@ -2173,7 +2173,7 @@ static int shmem_split_large_entry(struc
{
struct address_space *mapping = inode->i_mapping;
XA_STATE_ORDER(xas, &mapping->i_pages, index, 0);
- int split_order = 0, entry_order;
+ int split_order = 0;
int i;
/* Convert user data gfp flags to xarray node gfp flags */
@@ -2191,15 +2191,12 @@ static int shmem_split_large_entry(struc
goto unlock;
}
- entry_order = xas_get_order(&xas);
-
- if (!entry_order)
+ cur_order = xas_get_order(&xas);
+ if (!cur_order)
goto unlock;
/* Try to split large swap entry in pagecache */
- cur_order = entry_order;
- swap_index = round_down(index, 1 << entry_order);
-
+ swap_index = round_down(index, 1 << cur_order);
split_order = xas_try_split_min_order(cur_order);
while (cur_order > 0) {
_
Patches currently in -mm which might be from liuyun01@kylinos.cn are
reply other threads:[~2025-09-21 21:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20250921212620.23C1CC4CEE7@smtp.kernel.org \
--to=akpm@linux-foundation.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=hughd@google.com \
--cc=kasong@tencent.com \
--cc=liuyun01@kylinos.cn \
--cc=mm-commits@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.