Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\sched\autogroup.c Create Date:2022-07-28 09:43:39
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:proc_sched_autogroup_set_nice

Proto:int proc_sched_autogroup_set_nice(struct task_struct *p, int nice)

Type:int

Parameter:

TypeParameterName
struct task_struct *p
intnice
210  next = Have the 32 bit jiffies value wrap 5 minutes after boot* so jiffies wrap bugs show up earlier.
215  If nice < MIN_NICE || nice > MAX_NICE Then Return -EINVAL
218  err = security_task_setnice(current process, nice)
219  If err Then Return err
222  If nice < 0 && Not an_nice - check if a task can reduce its nice value*@p: task*@nice: nice value Then Return -EPERM
226  If Not Check operation authority && time_before(jiffies, next) Then Return -EAGAIN
229  next = HZ / 10 + jiffies
230  ag = autogroup_task_get(p)
232  idx = array_index_nospec - sanitize an array index after a bounds check* For a code sequence like:* if (index < size) {* index = array_index_nospec(index, size);* val = array[index];* }* (nice + 20, 40)
233  shares = scale_load(Nice levels are multiplicative, with a gentle 10% change for every* nice level changed[idx])
235  lock for writing
236  err = sched_group_set_shares(tg, shares)
237  If Not err Then nice = nice
239  lease a write lock
241  autogroup_kref_put(ag)
243  Return err