]> rtime.felk.cvut.cz Git - zynq/linux.git/commit
padata: ensure the reorder timer callback runs on the correct CPU
authorMathias Krause <minipli@googlemail.com>
Fri, 8 Sep 2017 18:57:10 +0000 (20:57 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 7 Oct 2017 04:10:31 +0000 (12:10 +0800)
commitcf5868c8a22dc2854b96e9569064bb92365549ca
treefb170091add3a262bd984c4ee092656a9bbc0326
parent1bd845bcb41d5b7f83745e0cb99273eb376f2ec5
padata: ensure the reorder timer callback runs on the correct CPU

The reorder timer function runs on the CPU where the timer interrupt was
handled which is not necessarily one of the CPUs of the 'pcpu' CPU mask
set.

Ensure the padata_reorder() callback runs on the correct CPU, which is
one in the 'pcpu' CPU mask set and, preferrably, the next expected one.
Do so by comparing the current CPU with the expected target CPU. If they
match, call padata_reorder() right away. If they differ, schedule a work
item on the target CPU that does the padata_reorder() call for us.

Signed-off-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
include/linux/padata.h
kernel/padata.c