Lines Matching defs:padata
2 * padata.c - generic interface to process data streams in parallel
25 #include <linux/padata.h>
46 static int padata_cpu_hash(struct padata_priv *padata)
51 pd = padata->pd;
57 cpu_index = padata->seq_nr % cpumask_weight(pd->cpumask.pcpu);
80 struct padata_priv *padata;
82 padata = list_entry(local_list.next,
85 list_del_init(&padata->list);
87 padata->parallel(padata);
94 * padata_do_parallel - padata parallelization function
96 * @pinst: padata instance
97 * @padata: object to be parallelized
99 * must be in the serial cpumask of padata(i.e. cpumask.cbcpu).
106 struct padata_priv *padata, int cb_cpu)
132 padata->pd = pd;
133 padata->cb_cpu = cb_cpu;
138 padata->seq_nr = atomic_inc_return(&pd->seq_nr);
140 target_cpu = padata_cpu_hash(padata);
144 list_add_tail(&padata->list, &queue->parallel.list);
178 struct padata_priv *padata;
200 padata = NULL;
205 padata = list_entry(reorder->list.next,
208 BUG_ON(next_nr != padata->seq_nr);
211 list_del_init(&padata->list);
222 padata = ERR_PTR(-ENODATA);
226 padata = ERR_PTR(-EINPROGRESS);
228 return padata;
233 struct padata_priv *padata;
251 padata = padata_get_next(pd);
259 if (!padata || PTR_ERR(padata) == -EINPROGRESS)
267 if (PTR_ERR(padata) == -ENODATA) {
273 squeue = per_cpu_ptr(pd->squeue, padata->cb_cpu);
276 list_add_tail(&padata->list, &squeue->serial.list);
279 queue_work_on(padata->cb_cpu, pinst->wq, &squeue->work);
320 struct padata_priv *padata;
322 padata = list_entry(local_list.next,
325 list_del_init(&padata->list);
327 padata->serial(padata);
334 * padata_do_serial - padata serialization function
336 * @padata: object to be serialized.
341 void padata_do_serial(struct padata_priv *padata)
347 pd = padata->pd;
354 list_add_tail(&padata->list, &pqueue->reorder.list);
474 /* Flush all objects out of the padata queues. */
551 * @pinst: A poineter to padata instance
630 * @pinst: padata instance
656 * @pinst: padata instance
715 * padata cpumasks.
717 * @pinst: padata instance
772 * padata cpumasks.
774 * @pinst: padata instance
808 * @pinst: padata instance to start
830 * @pinst: padata instance to stop
1046 * padata_alloc_possible - Allocate and initialize padata instance.
1050 * @wq: workqueue to use for the allocated padata instance
1059 * padata_alloc - allocate and initialize a padata instance and specify
1062 * @wq: workqueue to use for the allocated padata instance
1063 * @pcpumask: cpumask that will be used for padata parallelization
1064 * @cbcpumask: cpumask that will be used for padata serialization
1127 * padata_free - free a padata instance
1129 * @padata_inst: padata instance to free