Subject: [PATCH 00/38] Replace deprecated CPU-hotplug

This is a tree wide replacement of the deprecated CPU hotplug functions
which are only wrappers around the actual functions.

Each patch is independent and can be picked up by the relevant maintainer.

Cc: Alexander Shishkin <[email protected]>
Cc: Amit Kucheria <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Ben Segall <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: [email protected]
Cc: Christian Borntraeger <[email protected]>
Cc: [email protected]
Cc: Daniel Bristot de Oliveira <[email protected]>
Cc: Daniel Jordan <[email protected]>
Cc: Daniel Lezcano <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: Davidlohr Bueso <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Dietmar Eggemann <[email protected]>
Cc: Gonglei <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Guenter Roeck <[email protected]>
Cc: Hans de Goede <[email protected]>
Cc: Heiko Carstens <[email protected]>
Cc: Herbert Xu <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Jakub Kicinski <[email protected]>
Cc: Jason Wang <[email protected]>
Cc: Jean Delvare <[email protected]>
Cc: Jiri Kosina <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Joe Lawrence <[email protected]>
Cc: Joel Fernandes <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: John Stultz <[email protected]>
Cc: Jonathan Corbet <[email protected]>
Cc: Josh Poimboeuf <[email protected]>
Cc: Josh Triplett <[email protected]>
Cc: Julian Wiedmann <[email protected]>
Cc: Juri Lelli <[email protected]>
Cc: Karol Herbst <[email protected]>
Cc: Karsten Graul <[email protected]>
Cc: [email protected]
Cc: Lai Jiangshan <[email protected]>
Cc: Len Brown <[email protected]>
Cc: Len Brown <[email protected]>
Cc: Leo Yan <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: Mark Gross <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Mathieu Desnoyers <[email protected]>
Cc: Mathieu Poirier <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Michael Ellerman <[email protected]>
Cc: "Michael S. Tsirkin" <[email protected]>
Cc: Mike Leach <[email protected]>
Cc: Mike Travis <[email protected]>
Cc: Miroslav Benes <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: "Paul E. McKenney" <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Pavel Machek <[email protected]>
Cc: Pekka Paalanen <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Petr Mladek <[email protected]>
Cc: [email protected]
Cc: "Rafael J. Wysocki" <[email protected]>
Cc: [email protected]
Cc: Robin Holt <[email protected]>
Cc: Song Liu <[email protected]>
Cc: Srinivas Pandruvada <[email protected]>
Cc: Steffen Klassert <[email protected]>
Cc: Stephen Boyd <[email protected]>
Cc: Steven Rostedt <[email protected]>
Cc: Steve Wahl <[email protected]>
Cc: Stuart Hayes <[email protected]>
Cc: Suzuki K Poulose <[email protected]>
Cc: Tejun Heo <[email protected]>
Cc: Thomas Bogendoerfer <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Tony Luck <[email protected]>
Cc: Vasily Gorbik <[email protected]>
Cc: Vincent Guittot <[email protected]>
Cc: Viresh Kumar <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: Zefan Li <[email protected]>
Cc: Zhang Rui <[email protected]>

Sebastian



Subject: [PATCH 12/38] crypto: virtio: Replace deprecated CPU-hotplug functions.

The functions get_online_cpus() and put_online_cpus() have been
deprecated during the CPU hotplug rework. They map directly to
cpus_read_lock() and cpus_read_unlock().

Replace deprecated CPU-hotplug functions with the official version.
The behavior remains unchanged.

Cc: Gonglei <[email protected]>
Cc: "Michael S. Tsirkin" <[email protected]>
Cc: Jason Wang <[email protected]>
Cc: Herbert Xu <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: [email protected]
Cc: [email protected]
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
---
drivers/crypto/virtio/virtio_crypto_core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/virtio/virtio_crypto_core.c b/drivers/crypto/virtio/virtio_crypto_core.c
index 080955a1dd9c0..e2375d9923087 100644
--- a/drivers/crypto/virtio/virtio_crypto_core.c
+++ b/drivers/crypto/virtio/virtio_crypto_core.c
@@ -187,9 +187,9 @@ static int virtcrypto_init_vqs(struct virtio_crypto *vi)
if (ret)
goto err_free;

- get_online_cpus();
+ cpus_read_lock();
virtcrypto_set_affinity(vi);
- put_online_cpus();
+ cpus_read_unlock();

return 0;

--
2.32.0


Subject: [PATCH 27/38] padata: Replace deprecated CPU-hotplug functions.

The functions get_online_cpus() and put_online_cpus() have been
deprecated during the CPU hotplug rework. They map directly to
cpus_read_lock() and cpus_read_unlock().

Replace deprecated CPU-hotplug functions with the official version.
The behavior remains unchanged.

Cc: Steffen Klassert <[email protected]>
Cc: Daniel Jordan <[email protected]>
Cc: [email protected]
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
---
kernel/padata.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/kernel/padata.c b/kernel/padata.c
index d4d3ba6e1728a..0b0b6e8917d10 100644
--- a/kernel/padata.c
+++ b/kernel/padata.c
@@ -733,7 +733,7 @@ int padata_set_cpumask(struct padata_instance *pinst, int cpumask_type,
struct cpumask *serial_mask, *parallel_mask;
int err = -EINVAL;

- get_online_cpus();
+ cpus_read_lock();
mutex_lock(&pinst->lock);

switch (cpumask_type) {
@@ -753,7 +753,7 @@ int padata_set_cpumask(struct padata_instance *pinst, int cpumask_type,

out:
mutex_unlock(&pinst->lock);
- put_online_cpus();
+ cpus_read_unlock();

return err;
}
@@ -992,7 +992,7 @@ struct padata_instance *padata_alloc(const char *name)
if (!pinst->parallel_wq)
goto err_free_inst;

- get_online_cpus();
+ cpus_read_lock();

pinst->serial_wq = alloc_workqueue("%s_serial", WQ_MEM_RECLAIM |
WQ_CPU_INTENSIVE, 1, name);
@@ -1026,7 +1026,7 @@ struct padata_instance *padata_alloc(const char *name)
&pinst->cpu_dead_node);
#endif

- put_online_cpus();
+ cpus_read_unlock();

return pinst;

@@ -1036,7 +1036,7 @@ struct padata_instance *padata_alloc(const char *name)
err_free_serial_wq:
destroy_workqueue(pinst->serial_wq);
err_put_cpus:
- put_online_cpus();
+ cpus_read_unlock();
destroy_workqueue(pinst->parallel_wq);
err_free_inst:
kfree(pinst);
@@ -1074,9 +1074,9 @@ struct padata_shell *padata_alloc_shell(struct padata_instance *pinst)

ps->pinst = pinst;

- get_online_cpus();
+ cpus_read_lock();
pd = padata_alloc_pd(ps);
- put_online_cpus();
+ cpus_read_unlock();

if (!pd)
goto out_free_ps;
--
2.32.0


2021-08-03 15:32:42

by Hans de Goede

[permalink] [raw]
Subject: Re: [PATCH 00/38] Replace deprecated CPU-hotplug

Hi Sebastien,

On 8/3/21 4:15 PM, Sebastian Andrzej Siewior wrote:
> This is a tree wide replacement of the deprecated CPU hotplug functions
> which are only wrappers around the actual functions.
>
> Each patch is independent and can be picked up by the relevant maintainer.

Ok; and I take it that then also is the plan for merging these ?

FWIW I'm fine with the drivers/platform/x86 patch going upstream
through some other tree if its easier to keep the set together ...

Regards,

Hans



>
> Cc: Alexander Shishkin <[email protected]>
> Cc: Amit Kucheria <[email protected]>
> Cc: Andrew Morton <[email protected]>
> Cc: Andy Lutomirski <[email protected]>
> Cc: Arnaldo Carvalho de Melo <[email protected]>
> Cc: Arnd Bergmann <[email protected]>
> Cc: Benjamin Herrenschmidt <[email protected]>
> Cc: Ben Segall <[email protected]>
> Cc: Borislav Petkov <[email protected]>
> Cc: [email protected]
> Cc: Christian Borntraeger <[email protected]>
> Cc: [email protected]
> Cc: Daniel Bristot de Oliveira <[email protected]>
> Cc: Daniel Jordan <[email protected]>
> Cc: Daniel Lezcano <[email protected]>
> Cc: Dave Hansen <[email protected]>
> Cc: Davidlohr Bueso <[email protected]>
> Cc: "David S. Miller" <[email protected]>
> Cc: Dietmar Eggemann <[email protected]>
> Cc: Gonglei <[email protected]>
> Cc: Greg Kroah-Hartman <[email protected]>
> Cc: Guenter Roeck <[email protected]>
> Cc: Hans de Goede <[email protected]>
> Cc: Heiko Carstens <[email protected]>
> Cc: Herbert Xu <[email protected]>
> Cc: "H. Peter Anvin" <[email protected]>
> Cc: Ingo Molnar <[email protected]>
> Cc: Ingo Molnar <[email protected]>
> Cc: Jakub Kicinski <[email protected]>
> Cc: Jason Wang <[email protected]>
> Cc: Jean Delvare <[email protected]>
> Cc: Jiri Kosina <[email protected]>
> Cc: Jiri Olsa <[email protected]>
> Cc: Joe Lawrence <[email protected]>
> Cc: Joel Fernandes <[email protected]>
> Cc: Johannes Weiner <[email protected]>
> Cc: John Stultz <[email protected]>
> Cc: Jonathan Corbet <[email protected]>
> Cc: Josh Poimboeuf <[email protected]>
> Cc: Josh Triplett <[email protected]>
> Cc: Julian Wiedmann <[email protected]>
> Cc: Juri Lelli <[email protected]>
> Cc: Karol Herbst <[email protected]>
> Cc: Karsten Graul <[email protected]>
> Cc: [email protected]
> Cc: Lai Jiangshan <[email protected]>
> Cc: Len Brown <[email protected]>
> Cc: Len Brown <[email protected]>
> Cc: Leo Yan <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Cc: [email protected]
> Cc: Mark Gross <[email protected]>
> Cc: Mark Rutland <[email protected]>
> Cc: Mathieu Desnoyers <[email protected]>
> Cc: Mathieu Poirier <[email protected]>
> Cc: Mel Gorman <[email protected]>
> Cc: Michael Ellerman <[email protected]>
> Cc: "Michael S. Tsirkin" <[email protected]>
> Cc: Mike Leach <[email protected]>
> Cc: Mike Travis <[email protected]>
> Cc: Miroslav Benes <[email protected]>
> Cc: Namhyung Kim <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Cc: "Paul E. McKenney" <[email protected]>
> Cc: Paul Mackerras <[email protected]>
> Cc: Pavel Machek <[email protected]>
> Cc: Pekka Paalanen <[email protected]>
> Cc: Peter Zijlstra <[email protected]>
> Cc: Petr Mladek <[email protected]>
> Cc: [email protected]
> Cc: "Rafael J. Wysocki" <[email protected]>
> Cc: [email protected]
> Cc: Robin Holt <[email protected]>
> Cc: Song Liu <[email protected]>
> Cc: Srinivas Pandruvada <[email protected]>
> Cc: Steffen Klassert <[email protected]>
> Cc: Stephen Boyd <[email protected]>
> Cc: Steven Rostedt <[email protected]>
> Cc: Steve Wahl <[email protected]>
> Cc: Stuart Hayes <[email protected]>
> Cc: Suzuki K Poulose <[email protected]>
> Cc: Tejun Heo <[email protected]>
> Cc: Thomas Bogendoerfer <[email protected]>
> Cc: Thomas Gleixner <[email protected]>
> Cc: Tony Luck <[email protected]>
> Cc: Vasily Gorbik <[email protected]>
> Cc: Vincent Guittot <[email protected]>
> Cc: Viresh Kumar <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Cc: Zefan Li <[email protected]>
> Cc: Zhang Rui <[email protected]>
>
> Sebastian
>


Subject: Re: [PATCH 00/38] Replace deprecated CPU-hotplug

On 2021-08-03 17:30:40 [+0200], Hans de Goede wrote:
> Hi Sebastien,
Hi Hans,

> On 8/3/21 4:15 PM, Sebastian Andrzej Siewior wrote:
> > This is a tree wide replacement of the deprecated CPU hotplug functions
> > which are only wrappers around the actual functions.
> >
> > Each patch is independent and can be picked up by the relevant maintainer.
>
> Ok; and I take it that then also is the plan for merging these ?
>
> FWIW I'm fine with the drivers/platform/x86 patch going upstream
> through some other tree if its easier to keep the set together ...

There is no need to keep that set together since each patch is
independent. Please merge it through your tree.

> Regards,
>
> Hans

Sebastian

2021-08-04 15:07:58

by Daniel Jordan

[permalink] [raw]
Subject: Re: [PATCH 27/38] padata: Replace deprecated CPU-hotplug functions.

On Tue, Aug 03, 2021 at 04:16:10PM +0200, Sebastian Andrzej Siewior wrote:
> The functions get_online_cpus() and put_online_cpus() have been
> deprecated during the CPU hotplug rework. They map directly to
> cpus_read_lock() and cpus_read_unlock().
>
> Replace deprecated CPU-hotplug functions with the official version.
> The behavior remains unchanged.
>
> Cc: Steffen Klassert <[email protected]>
> Cc: Daniel Jordan <[email protected]>
> Cc: [email protected]
> Signed-off-by: Sebastian Andrzej Siewior <[email protected]>

Satisfying to see the old wrappers finally go away.

Acked-by: Daniel Jordan <[email protected]>

2021-08-12 11:37:20

by Herbert Xu

[permalink] [raw]
Subject: Re: [PATCH 27/38] padata: Replace deprecated CPU-hotplug functions.

On Tue, Aug 03, 2021 at 02:16:10PM +0000, Sebastian Andrzej Siewior wrote:
> The functions get_online_cpus() and put_online_cpus() have been
> deprecated during the CPU hotplug rework. They map directly to
> cpus_read_lock() and cpus_read_unlock().
>
> Replace deprecated CPU-hotplug functions with the official version.
> The behavior remains unchanged.
>
> Cc: Steffen Klassert <[email protected]>
> Cc: Daniel Jordan <[email protected]>
> Cc: [email protected]
> Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
> ---
> kernel/padata.c | 14 +++++++-------
> 1 file changed, 7 insertions(+), 7 deletions(-)

Patch applied. Thanks.
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

2021-08-12 11:38:01

by Herbert Xu

[permalink] [raw]
Subject: Re: [PATCH 12/38] crypto: virtio: Replace deprecated CPU-hotplug functions.

On Tue, Aug 03, 2021 at 04:15:55PM +0200, Sebastian Andrzej Siewior wrote:
> The functions get_online_cpus() and put_online_cpus() have been
> deprecated during the CPU hotplug rework. They map directly to
> cpus_read_lock() and cpus_read_unlock().
>
> Replace deprecated CPU-hotplug functions with the official version.
> The behavior remains unchanged.
>
> Cc: Gonglei <[email protected]>
> Cc: "Michael S. Tsirkin" <[email protected]>
> Cc: Jason Wang <[email protected]>
> Cc: Herbert Xu <[email protected]>
> Cc: "David S. Miller" <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
> ---
> drivers/crypto/virtio/virtio_crypto_core.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)

Patch applied. Thanks.
--
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt