函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\torture.c Create Date:2022-07-27 15:11:46
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Shuffle tasks such that we allow shuffle_idle_cpu to become idle.* A special case is when shuffle_idle_cpu = -1, in which case we allow* the tasks to run on all CPUs.

函数原型:static void torture_shuffle_tasks(void)

返回类型:void

参数:

379  设置全部CPU信息
380  get_online_cpus()
383  如果num_online_cpus()恒等于1则
384  put_online_cpus()
385  返回
389  Force all torture tasks off this CPU 等于pumask_next - get the next cpu in a cpumask*@n: the cpu prior to the place to search (ie. return will be > @n)*@srcp: the cpumask pointer* Returns >= nr_cpu_ids if no further cpus set.
390  如果Force all torture tasks off this CPU 大于等于CPU数量Force all torture tasks off this CPU 等于负1
392  否则清空CPU信息
395  mutex_lock( & shuffle_task_mutex)
396  list_for_each_entry - iterate over list of given type*@pos: the type * to use as a loop cursor.*@head: the head for your list.*@member: the name of the list_head within the struct.(stp, & shuffle_task_list, st_l)
397  set_cpus_allowed_ptr(st_t, shuffle_tmp_mask)
398  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
400  put_online_cpus()
调用者
名称描述
torture_shuffleShuffle tasks across CPUs, with the intent of allowing each CPU in the* system to become idle at a time and cut off its timer ticks. This is meant* to test the support for such tickless idle CPU in RCU.