Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\padata.c Create Date:2022-07-28 13:47:36
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Allocate and initialize the internal cpumask dependend resources.

Proto:static struct parallel_data *padata_alloc_pd(struct padata_shell *ps)

Type:struct parallel_data

Parameter:

TypeParameterName
struct padata_shell *ps
431  pinst = pinst
436  cbcpumask = cbcpu
437  pcpumask = pcpu
439  pd = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
440  If Not pd Then Go to err
443  pqueue = alloc_percpu(structpadata_parallel_queue)
444  If Not pqueue Then Go to err_free_pd
447  squeue = alloc_percpu(structpadata_serial_queue)
448  If Not squeue Then Go to err_free_pqueue
451  ps = ps
452  If pd_setup_cpumasks(pd, pcpumask, cbcpumask) Then Go to err_free_squeue
455  Initialize all percpu queues used by parallel workers
456  Initialize all percpu queues used by serial workers
457  atomic_set( & seq_nr, - 1)
458  atomic_set( & reorder_objects, 0)
459  atomic_set( & refcnt, 1)
460  Process spin lock initialization( & lock)
461  cpu = Uniprocessor. Assume all masks are "1".
462  INIT_WORK( & reorder_work, invoke_padata_reorder)
464  Return pd
466  err_free_squeue :
467  free previously allocated percpu memory
468  err_free_pqueue :
469  free previously allocated percpu memory
470  err_free_pd :
471  kfree(pd)
472  err :
473  Return NULL
Caller
NameDescribe
padata_replace_oneReplace the internal control structure with a new one.
padata_alloc_shellpadata_alloc_shell - Allocate and initialize padata shell.*@pinst: Parent padata_instance object.