Skip to contentSkip to conversation

hugetlb: fix CONFIG_PADATA dependency for non-SMP system

PATCH Muchun Song 1 participant 2 messages Feb 8, 2024 – Feb 10, 2024 Memory management

lore
Share & tools
lore
#0 lore raw



Quoted 7 lines · Gang Li
Quoted 3 lines · Muchun Song

Actually, I did not get it. Why the above code cannot work? The above code already make it serialized in one call, right? What do I miss here? Thanks.

Quoted 5 lines

PADATA consists of two distinct functionality:

One part is padata_do_multithreaded, which disregards order and simply divides tasks into several groups for parallel execution. My patch use padata_do_multithreaded.

OK. Since all users of PADATA of non-SMP case currently only use padata_do_multithreaded, it’s possible and easy to implement a variant of that in non-SMP case. It is not necessary to implement another functionality unless the only user of crypto/pcrypt.c does not depend on SMP in the future, at least now it’s dependent on SMP.

Thanks.

Quoted 13 lines

The other part is composed of a set of APIs that, while handling data in an out-of-order parallel manner, can eventually return the data with ordered sequence. Only crypto/pcrypt.c use them. I guess these APIs are designed specifically for crypto/pcrypt.c.

```
padata_alloc
padata_alloc_shell
padata_do_parallel
padata_do_serial
padata_free_shell
padata_free
```
#1 lore raw

CC Jane, Daniel Jordan, Steffen as well in this thread.

Quoted 33 lines · Muchun Song



Quoted 7 lines · Gang Li
Quoted 3 lines · Muchun Song

Actually, I did not get it. Why the above code cannot work? The above code already make it serialized in one call, right? What do I miss here? Thanks.

Quoted 5 lines

PADATA consists of two distinct functionality:

One part is padata_do_multithreaded, which disregards order and simply divides tasks into several groups for parallel execution. My patch use padata_do_multithreaded.

OK. Since all users of PADATA of non-SMP case currently only use padata_do_multithreaded, it’s possible and easy to implement a variant of that in non-SMP case. It is not necessary to implement another functionality unless the only user of crypto/pcrypt.c does not depend on SMP in the future, at least now it’s dependent on SMP.

Thanks.

Quoted 13 lines

The other part is composed of a set of APIs that, while handling data in an out-of-order parallel manner, can eventually return the data with ordered sequence. Only crypto/pcrypt.c use them. I guess these APIs are designed specifically for crypto/pcrypt.c.

```
padata_alloc
padata_alloc_shell
padata_do_parallel
padata_do_serial
padata_free_shell
padata_free
```