From: Yury Norov <yury.norov@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ming Lei <ming.lei@redhat.com>,
linux-kernel@vger.kernel.org
Cc: Yury Norov <yury.norov@gmail.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Rasmus Villemoes <linux@rasmusvillemoes.dk>
Subject: [PATCH v4 0/9] lib/group_cpus: rework grp_spread_init_one() and make it O(1)
Date: Thu, 28 Dec 2023 12:09:27 -0800 [thread overview]
Message-ID: <20231228200936.2475595-1-yury.norov@gmail.com> (raw)
Hi Andrew, Ming,
Now that we've got a couple more weeks, let's try to merge this series in
the upcoming merge window? In addition to addressing the v3 comments, in
v4 I added a few more patches that simplify the code for more by using
cleanup machinery.
Thanks,
Yury
--
grp_spread_init_one() implementation is sub-optimal because it
traverses bitmaps from the beginning, instead of picking from the
previous iteration.
Fix it and use find_bit API where appropriate. While here, optimize
cpumasks allocation and drop unneeded cpumask_empty() call.
---
v1: https://lore.kernel.org/all/ZW5MI3rKQueLM0Bz@yury-ThinkPad/T/
v2: https://lore.kernel.org/lkml/ZXKNVRu3AfvjaFhK@fedora/T/
v3: https://lore.kernel.org/all/ZYnD4Bp8R9oIz19s@yury-ThinkPad/T/
v4:
- drop patch v3 #7 and add a comment in patch #4;
- patch #2: fix cpus_per_grp decrement order;
- patch #3: add NAK fro Ming Lei;
- add patches #7-9 that simplify the code for more.
Yury Norov (9):
cpumask: introduce for_each_cpu_and_from()
lib/group_cpus: optimize inner loop in grp_spread_init_one()
lib/group_cpus: relax atomicity requirement in grp_spread_init_one()
lib/group_cpus: optimize outer loop in grp_spread_init_one()
lib/group_cpus: don't zero cpumasks in group_cpus_evenly() on
allocation
lib/group_cpus: drop unneeded cpumask_empty() call in
__group_cpus_evenly()
cpumask: define cleanup function for cpumasks
lib/group_cpus: rework group_cpus_evenly()
lib/group_cpus: simplify group_cpus_evenly() for more
include/linux/cpumask.h | 14 ++++++
include/linux/find.h | 3 ++
lib/group_cpus.c | 104 +++++++++++++++++-----------------------
3 files changed, 62 insertions(+), 59 deletions(-)
--
2.40.1
next reply other threads:[~2023-12-28 20:09 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-28 20:09 Yury Norov [this message]
2023-12-28 20:09 ` [PATCH 1/9] cpumask: introduce for_each_cpu_and_from() Yury Norov
2023-12-28 20:09 ` [PATCH 2/9] lib/group_cpus: optimize inner loop in grp_spread_init_one() Yury Norov
2024-01-02 0:59 ` Ming Lei
2023-12-28 20:09 ` [PATCH 3/9] lib/group_cpus: relax atomicity requirement " Yury Norov
2023-12-29 18:39 ` Andrew Morton
2023-12-29 18:45 ` Yury Norov
2023-12-28 20:09 ` [PATCH 4/9] lib/group_cpus: optimize outer loop " Yury Norov
2023-12-28 20:09 ` [PATCH 5/9] lib/group_cpus: don't zero cpumasks in group_cpus_evenly() on allocation Yury Norov
2023-12-28 20:09 ` [PATCH 6/9] lib/group_cpus: drop unneeded cpumask_empty() call in __group_cpus_evenly() Yury Norov
2023-12-28 20:09 ` [PATCH 7/9] cpumask: define cleanup function for cpumasks Yury Norov
2023-12-28 20:09 ` [PATCH 8/9] lib/group_cpus: rework group_cpus_evenly() Yury Norov
2023-12-28 20:09 ` [PATCH 9/9] lib/group_cpus: simplify group_cpus_evenly() for more Yury Norov
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=20231228200936.2475595-1-yury.norov@gmail.com \
--to=yury.norov@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=ming.lei@redhat.com \
--cc=tglx@linutronix.de \
/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®