Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'sched_urgent_for_v5.15_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull scheduler fixes from Borislav Petkov:

- Tell the compiler to always inline is_percpu_thread()

- Make sure tunable_scaling buffer is null-terminated after an update
in sysfs

- Fix LTP named regression due to cgroup list ordering

* tag 'sched_urgent_for_v5.15_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
sched: Always inline is_percpu_thread()
sched/fair: Null terminate buffer when updating tunable_scaling
sched/fair: Add ancestors of unthrottled undecayed cfs_rq

+13 -3
+1 -1
include/linux/sched.h
··· 1720 1720 #define tsk_used_math(p) ((p)->flags & PF_USED_MATH) 1721 1721 #define used_math() tsk_used_math(current) 1722 1722 1723 - static inline bool is_percpu_thread(void) 1723 + static __always_inline bool is_percpu_thread(void) 1724 1724 { 1725 1725 #ifdef CONFIG_SMP 1726 1726 return (current->flags & PF_NO_SETAFFINITY) &&
+7 -1
kernel/sched/debug.c
··· 173 173 size_t cnt, loff_t *ppos) 174 174 { 175 175 char buf[16]; 176 + unsigned int scaling; 176 177 177 178 if (cnt > 15) 178 179 cnt = 15; 179 180 180 181 if (copy_from_user(&buf, ubuf, cnt)) 181 182 return -EFAULT; 183 + buf[cnt] = '\0'; 182 184 183 - if (kstrtouint(buf, 10, &sysctl_sched_tunable_scaling)) 185 + if (kstrtouint(buf, 10, &scaling)) 184 186 return -EINVAL; 185 187 188 + if (scaling >= SCHED_TUNABLESCALING_END) 189 + return -EINVAL; 190 + 191 + sysctl_sched_tunable_scaling = scaling; 186 192 if (sched_update_scaling()) 187 193 return -EINVAL; 188 194
+5 -1
kernel/sched/fair.c
··· 4936 4936 /* update hierarchical throttle state */ 4937 4937 walk_tg_tree_from(cfs_rq->tg, tg_nop, tg_unthrottle_up, (void *)rq); 4938 4938 4939 - if (!cfs_rq->load.weight) 4939 + /* Nothing to run but something to decay (on_list)? Complete the branch */ 4940 + if (!cfs_rq->load.weight) { 4941 + if (cfs_rq->on_list) 4942 + goto unthrottle_throttle; 4940 4943 return; 4944 + } 4941 4945 4942 4946 task_delta = cfs_rq->h_nr_running; 4943 4947 idle_task_delta = cfs_rq->idle_h_nr_running;