All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org,tj@kernel.org,dennis@kernel.org,cl@gentwo.org,a909204013@gmail.com,niuwl1@chinatelecom.cn,akpm@linux-foundation.org
Subject: [alternative-merged] mm-percpu-drop-unused-max_upa-in-pcpu_build_alloc_info.patch removed from -mm tree
Date: Fri, 19 Dec 2025 19:28:24 -0800	[thread overview]
Message-ID: <20251220032825.AF14AC4CEF5@smtp.kernel.org> (raw)


The quilt patch titled
     Subject: mm/percpu: drop unused max_upa in pcpu_build_alloc_info()
has been removed from the -mm tree.  Its filename was
     mm-percpu-drop-unused-max_upa-in-pcpu_build_alloc_info.patch

This patch was dropped because an alternative patch was or shall be merged

------------------------------------------------------
From: WanLi Niu <niuwl1@chinatelecom.cn>
Subject: mm/percpu: drop unused max_upa in pcpu_build_alloc_info()
Date: Mon, 8 Dec 2025 17:26:27 +0800

pcpu_build_alloc_info() only needs the initial upa as the starting point
for the downward search.  Storing it in max_upa and reusing it adds no
value.  Iterate from upa directly to remove the redundant local variable
without changing behavior, improving readability.

Link: https://lkml.kernel.org/r/20251208092627.5603-1-niuwl1@chinatelecom.cn
Signed-off-by: WanLi Niu <niuwl1@chinatelecom.cn>
Co-developed-by: hlleng <a909204013@gmail.com>
Signed-off-by: hlleng <a909204013@gmail.com>
Cc: Christoph Lameter (Ampere) <cl@gentwo.org>
Cc: Dennis Zhou <dennis@kernel.org>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/percpu.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

--- a/mm/percpu.c~mm-percpu-drop-unused-max_upa-in-pcpu_build_alloc_info
+++ a/mm/percpu.c
@@ -2800,7 +2800,7 @@ static struct pcpu_alloc_info * __init _
 	const size_t static_size = __per_cpu_end - __per_cpu_start;
 	int nr_groups = 1, nr_units = 0;
 	size_t size_sum, min_unit_size, alloc_size;
-	int upa, max_upa, best_upa;	/* units_per_alloc */
+	int upa, best_upa;	/* units_per_alloc */
 	int last_allocs, group, unit;
 	unsigned int cpu, tcpu;
 	struct pcpu_alloc_info *ai;
@@ -2817,7 +2817,7 @@ static struct pcpu_alloc_info * __init _
 	dyn_size = size_sum - static_size - reserved_size;
 
 	/*
-	 * Determine min_unit_size, alloc_size and max_upa such that
+	 * Determine min_unit_size, alloc_size such that
 	 * alloc_size is multiple of atom_size and is the smallest
 	 * which can accommodate 4k aligned segments which are equal to
 	 * or larger than min_unit_size.
@@ -2829,7 +2829,6 @@ static struct pcpu_alloc_info * __init _
 	upa = alloc_size / min_unit_size;
 	while (alloc_size % upa || (offset_in_page(alloc_size / upa)))
 		upa--;
-	max_upa = upa;
 
 	cpumask_copy(&mask, cpu_possible_mask);
 
@@ -2860,7 +2859,7 @@ static struct pcpu_alloc_info * __init _
 	 */
 	last_allocs = INT_MAX;
 	best_upa = 0;
-	for (upa = max_upa; upa; upa--) {
+	for (; upa; upa--) {
 		int allocs = 0, wasted = 0;
 
 		if (alloc_size % upa || (offset_in_page(alloc_size / upa)))
_

Patches currently in -mm which might be from niuwl1@chinatelecom.cn are



                 reply	other threads:[~2025-12-20  3:28 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=20251220032825.AF14AC4CEF5@smtp.kernel.org \
    --to=akpm@linux-foundation.org \
    --cc=a909204013@gmail.com \
    --cc=cl@gentwo.org \
    --cc=dennis@kernel.org \
    --cc=mm-commits@vger.kernel.org \
    --cc=niuwl1@chinatelecom.cn \
    --cc=tj@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.