From: Bjorn Helgaas <helgaas@kernel.org>
To: Yury Norov <yury.norov@gmail.com>
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
linux-s390@vger.kernel.org, netdev@vger.kernel.org,
virtualization@lists.linux.dev, linux-nvme@lists.infradead.org,
linux-hyperv@vger.kernel.org, linux-pci@vger.kernel.org,
linux-scsi@vger.kernel.org, linux-crypto@vger.kernel.org,
"Michael Ellerman" <mpe@ellerman.id.au>,
"Nicholas Piggin" <npiggin@gmail.com>,
"Christophe Leroy" <christophe.leroy@csgroup.eu>,
"Naveen N Rao" <naveen@kernel.org>,
"Madhavan Srinivasan" <maddy@linux.ibm.com>,
"Heiko Carstens" <hca@linux.ibm.com>,
"Vasily Gorbik" <gor@linux.ibm.com>,
"Alexander Gordeev" <agordeev@linux.ibm.com>,
"Christian Borntraeger" <borntraeger@linux.ibm.com>,
"Sven Schnelle" <svens@linux.ibm.com>,
"Haren Myneni" <haren@linux.ibm.com>,
"Rick Lindsley" <ricklind@linux.ibm.com>,
"Nick Child" <nnac123@linux.ibm.com>,
"Thomas Falcon" <tlfalcon@linux.ibm.com>,
"Andrew Lunn" <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Jason Wang" <jasowang@redhat.com>,
"Xuan Zhuo" <xuanzhuo@linux.alibaba.com>,
"Eugenio Pérez" <eperezma@redhat.com>,
"Keith Busch" <kbusch@kernel.org>, "Jens Axboe" <axboe@kernel.dk>,
"Christoph Hellwig" <hch@lst.de>,
"Sagi Grimberg" <sagi@grimberg.me>,
"K. Y. Srinivasan" <kys@microsoft.com>,
"Haiyang Zhang" <haiyangz@microsoft.com>,
"Wei Liu" <wei.liu@kernel.org>,
"Dexuan Cui" <decui@microsoft.com>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Krzysztof Wilczyński" <kw@linux.com>,
"Manivannan Sadhasivam" <manivannan.sadhasivam@linaro.org>,
"Rob Herring" <robh@kernel.org>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"James Smart" <james.smart@broadcom.com>,
"Dick Kennedy" <dick.kennedy@broadcom.com>,
"James E.J. Bottomley" <James.Bottomley@hansenpartnership.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
"Rasmus Villemoes" <linux@rasmusvillemoes.dk>,
"Matt Wu" <wuqiang.matt@bytedance.com>,
"Steffen Klassert" <steffen.klassert@secunet.com>,
"Daniel Jordan" <daniel.m.jordan@oracle.com>,
"Andrew Morton" <akpm@linux-foundation.org>,
"Greg Kurz" <groug@kaod.org>, "Peter Xu" <peterx@redhat.com>,
"Shrikanth Hegde" <sshegde@linux.ibm.com>,
"Hendrik Brueckner" <brueckner@linux.ibm.com>
Subject: Re: [PATCH 05/14] cpumask: deprecate cpumask_next_wrap()
Date: Fri, 3 Jan 2025 11:39:30 -0600 [thread overview]
Message-ID: <20250103173930.GA4181899@bhelgaas> (raw)
In-Reply-To: <20241228184949.31582-6-yury.norov@gmail.com>
On Sat, Dec 28, 2024 at 10:49:37AM -0800, Yury Norov wrote:
> The next patche aligns implementation of cpumask_next_wrap() with the
> generic version in find.h which changes function signature.
s/patche/patch/
I guess this is an indirect reference to find_next_bit_wrap()? If so,
I think mentioning the function name would be more useful than
referring to "the generic version in find.h".
> To make the transition smooth, this patch deprecates current
> implementation by adding an _old suffix. The following patches switch
> current users to the new implementation one by one.
>
> No functional changes were intended.
>
> Signed-off-by: Yury Norov <yury.norov@gmail.com>
> ---
> arch/s390/kernel/processor.c | 2 +-
> drivers/nvme/host/tcp.c | 2 +-
> drivers/pci/controller/pci-hyperv.c | 2 +-
> drivers/scsi/lpfc/lpfc_init.c | 2 +-
> include/linux/cpumask.h | 4 ++--
> kernel/padata.c | 2 +-
> lib/cpumask.c | 6 +++---
> 7 files changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/arch/s390/kernel/processor.c b/arch/s390/kernel/processor.c
> index 5ce9a795a0fe..42ca61909030 100644
> --- a/arch/s390/kernel/processor.c
> +++ b/arch/s390/kernel/processor.c
> @@ -72,7 +72,7 @@ void notrace stop_machine_yield(const struct cpumask *cpumask)
> this_cpu = smp_processor_id();
> if (__this_cpu_inc_return(cpu_relax_retry) >= spin_retry) {
> __this_cpu_write(cpu_relax_retry, 0);
> - cpu = cpumask_next_wrap(this_cpu, cpumask, this_cpu, false);
> + cpu = cpumask_next_wrap_old(this_cpu, cpumask, this_cpu, false);
> if (cpu >= nr_cpu_ids)
> return;
> if (arch_vcpu_is_preempted(cpu))
> diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c
> index 28c76a3e1bd2..054904376c3c 100644
> --- a/drivers/nvme/host/tcp.c
> +++ b/drivers/nvme/host/tcp.c
> @@ -1578,7 +1578,7 @@ static void nvme_tcp_set_queue_io_cpu(struct nvme_tcp_queue *queue)
> if (wq_unbound)
> queue->io_cpu = WORK_CPU_UNBOUND;
> else
> - queue->io_cpu = cpumask_next_wrap(n - 1, cpu_online_mask, -1, false);
> + queue->io_cpu = cpumask_next_wrap_old(n - 1, cpu_online_mask, -1, false);
> }
>
> static void nvme_tcp_tls_done(void *data, int status, key_serial_t pskid)
> diff --git a/drivers/pci/controller/pci-hyperv.c b/drivers/pci/controller/pci-hyperv.c
> index cdd5be16021d..86d1c2be8eb5 100644
> --- a/drivers/pci/controller/pci-hyperv.c
> +++ b/drivers/pci/controller/pci-hyperv.c
> @@ -1757,7 +1757,7 @@ static int hv_compose_multi_msi_req_get_cpu(void)
>
> spin_lock_irqsave(&multi_msi_cpu_lock, flags);
>
> - cpu_next = cpumask_next_wrap(cpu_next, cpu_online_mask, nr_cpu_ids,
> + cpu_next = cpumask_next_wrap_old(cpu_next, cpu_online_mask, nr_cpu_ids,
> false);
> cpu = cpu_next;
>
> diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
> index 7f57397d91a9..31622fb0614a 100644
> --- a/drivers/scsi/lpfc/lpfc_init.c
> +++ b/drivers/scsi/lpfc/lpfc_init.c
> @@ -12876,7 +12876,7 @@ lpfc_irq_rebalance(struct lpfc_hba *phba, unsigned int cpu, bool offline)
>
> if (offline) {
> /* Find next online CPU on original mask */
> - cpu_next = cpumask_next_wrap(cpu, orig_mask, cpu, true);
> + cpu_next = cpumask_next_wrap_old(cpu, orig_mask, cpu, true);
> cpu_select = lpfc_next_online_cpu(orig_mask, cpu_next);
>
> /* Found a valid CPU */
> diff --git a/include/linux/cpumask.h b/include/linux/cpumask.h
> index 30042351f15f..b267a4f6a917 100644
> --- a/include/linux/cpumask.h
> +++ b/include/linux/cpumask.h
> @@ -296,7 +296,7 @@ unsigned int cpumask_next_and(int n, const struct cpumask *src1p,
>
> #if NR_CPUS == 1
> static __always_inline
> -unsigned int cpumask_next_wrap(int n, const struct cpumask *mask, int start, bool wrap)
> +unsigned int cpumask_next_wrap_old(int n, const struct cpumask *mask, int start, bool wrap)
> {
> cpumask_check(start);
> if (n != -1)
> @@ -312,7 +312,7 @@ unsigned int cpumask_next_wrap(int n, const struct cpumask *mask, int start, boo
> return cpumask_first(mask);
> }
> #else
> -unsigned int __pure cpumask_next_wrap(int n, const struct cpumask *mask, int start, bool wrap);
> +unsigned int __pure cpumask_next_wrap_old(int n, const struct cpumask *mask, int start, bool wrap);
> #endif
>
> /**
> diff --git a/kernel/padata.c b/kernel/padata.c
> index d51bbc76b227..454ff2fca40b 100644
> --- a/kernel/padata.c
> +++ b/kernel/padata.c
> @@ -274,7 +274,7 @@ static struct padata_priv *padata_find_next(struct parallel_data *pd,
> if (remove_object) {
> list_del_init(&padata->list);
> ++pd->processed;
> - pd->cpu = cpumask_next_wrap(cpu, pd->cpumask.pcpu, -1, false);
> + pd->cpu = cpumask_next_wrap_old(cpu, pd->cpumask.pcpu, -1, false);
> }
>
> spin_unlock(&reorder->lock);
> diff --git a/lib/cpumask.c b/lib/cpumask.c
> index e77ee9d46f71..c9a9b451772a 100644
> --- a/lib/cpumask.c
> +++ b/lib/cpumask.c
> @@ -8,7 +8,7 @@
> #include <linux/numa.h>
>
> /**
> - * cpumask_next_wrap - helper to implement for_each_cpu_wrap
> + * cpumask_next_wrap_old - helper to implement for_each_cpu_wrap
> * @n: the cpu prior to the place to search
> * @mask: the cpumask pointer
> * @start: the start point of the iteration
> @@ -19,7 +19,7 @@
> * Note: the @wrap argument is required for the start condition when
> * we cannot assume @start is set in @mask.
> */
> -unsigned int cpumask_next_wrap(int n, const struct cpumask *mask, int start, bool wrap)
> +unsigned int cpumask_next_wrap_old(int n, const struct cpumask *mask, int start, bool wrap)
> {
> unsigned int next;
>
> @@ -37,7 +37,7 @@ unsigned int cpumask_next_wrap(int n, const struct cpumask *mask, int start, boo
>
> return next;
> }
> -EXPORT_SYMBOL(cpumask_next_wrap);
> +EXPORT_SYMBOL(cpumask_next_wrap_old);
>
> /* These are not inline because of header tangles. */
> #ifdef CONFIG_CPUMASK_OFFSTACK
> --
> 2.43.0
>
next prev parent reply other threads:[~2025-01-03 17:39 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-28 18:49 [PATCH 00/14] cpumask: cleanup cpumask_next_wrap() implementation and usage Yury Norov
2024-12-28 18:49 ` [PATCH 01/14] objpool: rework objpool_pop() Yury Norov
2024-12-28 18:49 ` [PATCH 02/14] virtio_net: simplify virtnet_set_affinity() Yury Norov
2024-12-28 18:49 ` [PATCH 03/14] ibmvnic: simplify ibmvnic_set_queue_affinity() Yury Norov
2025-01-07 22:37 ` Nick Child
2025-01-07 22:42 ` Yury Norov
2025-01-07 23:04 ` Yury Norov
2025-01-08 14:08 ` [PATCH 03/14] ibmvnic: simplify ibmvnic_set_queue_affinity()y Nick Child
2024-12-28 18:49 ` [PATCH 04/14] powerpc/xmon: simplify xmon_batch_next_cpu() Yury Norov
2024-12-28 18:49 ` [PATCH 05/14] cpumask: deprecate cpumask_next_wrap() Yury Norov
2025-01-03 17:39 ` Bjorn Helgaas [this message]
2024-12-28 18:49 ` [PATCH 06/14] cpumask: re-introduce cpumask_next{,_and}_wrap() Yury Norov
2025-01-03 17:44 ` Bjorn Helgaas
2025-01-15 3:41 ` Yury Norov
2025-01-07 13:28 ` Alexander Gordeev
2025-01-15 3:38 ` Yury Norov
2024-12-28 18:49 ` [PATCH 07/14] cpumask: use cpumask_next_wrap() where appropriate Yury Norov
2024-12-28 18:49 ` [PATCH 08/14] padata: switch padata_find_next() to using cpumask_next_wrap() Yury Norov
2025-01-04 0:33 ` Herbert Xu
2025-01-07 19:02 ` Daniel Jordan
2024-12-28 18:49 ` [PATCH 09/14] s390: switch stop_machine_yield() " Yury Norov
2024-12-28 18:49 ` [PATCH 10/14] nvme-tcp: switch nvme_tcp_set_queue_io_cpu() " Yury Norov
2024-12-30 8:31 ` Sagi Grimberg
2024-12-28 18:49 ` [PATCH 11/14] scsi: lpfc: switch lpfc_irq_rebalance() " Yury Norov
2024-12-31 1:05 ` Justin Tee
2024-12-28 18:49 ` [PATCH 12/14] scsi: lpfc: rework lpfc_next_{online,present}_cpu() Yury Norov
2024-12-31 1:06 ` Justin Tee
2024-12-28 18:49 ` [PATCH 13/14] PCI: hv: switch hv_compose_multi_msi_req_get_cpu() to using cpumask_next_wrap() Yury Norov
2024-12-29 17:34 ` Michael Kelley
2025-01-03 17:45 ` Bjorn Helgaas
2025-01-03 18:56 ` Yury Norov
2024-12-28 18:49 ` [PATCH 14/14] cpumask: drop cpumask_next_wrap_old() Yury Norov
2025-01-03 7:02 ` [PATCH 00/14] cpumask: cleanup cpumask_next_wrap() implementation and usage Christoph Hellwig
2025-01-03 15:21 ` 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=20250103173930.GA4181899@bhelgaas \
--to=helgaas@kernel.org \
--cc=James.Bottomley@hansenpartnership.com \
--cc=agordeev@linux.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=andrew+netdev@lunn.ch \
--cc=axboe@kernel.dk \
--cc=bhelgaas@google.com \
--cc=borntraeger@linux.ibm.com \
--cc=brueckner@linux.ibm.com \
--cc=christophe.leroy@csgroup.eu \
--cc=daniel.m.jordan@oracle.com \
--cc=davem@davemloft.net \
--cc=decui@microsoft.com \
--cc=dick.kennedy@broadcom.com \
--cc=edumazet@google.com \
--cc=eperezma@redhat.com \
--cc=gor@linux.ibm.com \
--cc=groug@kaod.org \
--cc=haiyangz@microsoft.com \
--cc=haren@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=hch@lst.de \
--cc=james.smart@broadcom.com \
--cc=jasowang@redhat.com \
--cc=kbusch@kernel.org \
--cc=kuba@kernel.org \
--cc=kw@linux.com \
--cc=kys@microsoft.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linux@rasmusvillemoes.dk \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=lpieralisi@kernel.org \
--cc=maddy@linux.ibm.com \
--cc=manivannan.sadhasivam@linaro.org \
--cc=martin.petersen@oracle.com \
--cc=mpe@ellerman.id.au \
--cc=mst@redhat.com \
--cc=naveen@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nnac123@linux.ibm.com \
--cc=npiggin@gmail.com \
--cc=pabeni@redhat.com \
--cc=peterx@redhat.com \
--cc=ricklind@linux.ibm.com \
--cc=robh@kernel.org \
--cc=sagi@grimberg.me \
--cc=sshegde@linux.ibm.com \
--cc=steffen.klassert@secunet.com \
--cc=svens@linux.ibm.com \
--cc=tlfalcon@linux.ibm.com \
--cc=virtualization@lists.linux.dev \
--cc=wei.liu@kernel.org \
--cc=wuqiang.matt@bytedance.com \
--cc=xuanzhuo@linux.alibaba.com \
--cc=yury.norov@gmail.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 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.