mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 15:27:29 +00:00
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>
This commit is contained in:
parent
1bd845bcb4
commit
cf5868c8a2
2 changed files with 44 additions and 1 deletions
|
@ -85,6 +85,7 @@ struct padata_serial_queue {
|
|||
* @swork: work struct for serialization.
|
||||
* @pd: Backpointer to the internal control structure.
|
||||
* @work: work struct for parallelization.
|
||||
* @reorder_work: work struct for reordering.
|
||||
* @num_obj: Number of objects that are processed by this cpu.
|
||||
* @cpu_index: Index of the cpu.
|
||||
*/
|
||||
|
@ -93,6 +94,7 @@ struct padata_parallel_queue {
|
|||
struct padata_list reorder;
|
||||
struct parallel_data *pd;
|
||||
struct work_struct work;
|
||||
struct work_struct reorder_work;
|
||||
atomic_t num_obj;
|
||||
int cpu_index;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue