Skip to content

padata: updates

Steffen Klassert linux-crypto lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6padata: Check for valid padata instance on startcrypto/pcrypt.c include/linux/padata.h kernel/padata.c+32 -80 replies
2/6padata: Block until the instance is unused on stopkernel/padata.c+16 -80 replies
3/6padata: Handle empty padata cpumaskskernel/padata.c+50 -110 replies
4/6padata: make padata_do_parallel to return zero on successcrypto/pcrypt.c kernel/padata.c+11 -180 replies
5/6padata: simplify serialization mechanisminclude/linux/padata.h kernel/padata.c+22 -550 replies
6/6padata: update documentationDocumentation/padata.txt+11 -100 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/6] padata: updates

This patchset contains the following changes:

1. Add a flag to mark the padata instance as invalid. We will use this to mark the padata instace as invalid if the padata cpumask contains no active cpu.

2. Make padata_stop to block until the padata instance is unused. So it's save to change the cpumask after a call to padata_stop.

3. Add a possibility to handle empty padata cpumasks. The first three patches address a bug, found by Dan Kruchinin. When the padata cpumask does not intersect with the active cpumask we get a division by zero in padata_alloc_pd and we end up with a useless padata instance. It's not possible to trigger this bug by now, but Dan has patches that let the cpumask change from userspace. So this bug has to be fixed before these patches can go in.

4. Make padata_do_parallel to return zero on success. To return -EINPROGRESS on success was considered to be odd, so we change the API to return zero instead. Users are updated accordingly.

5. Simplify the serialization mechanism.
As it is, we go through all the percpu reorder queues to calculate the sequence number of the next object that needs serialization. This patch avoids this and minimalizes the accesses of foreign memory. This gives some performance inprovements, in particular on machines with many cpus.

6. Update the padata documentation.

Steffen