core.c (4aef2ec9022b217f74d0f4c9b84081f07cc223d9) | core.c (d08b9f0ca6605e13dcb48f04e55a30545b3c71eb) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * kernel/sched/core.c 4 * 5 * Core kernel scheduler code and related syscalls 6 * 7 * Copyright (C) 1991-2002 Linus Torvalds 8 */ 9#include "sched.h" 10 11#include <linux/nospec.h> 12 13#include <linux/kcov.h> | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * kernel/sched/core.c 4 * 5 * Core kernel scheduler code and related syscalls 6 * 7 * Copyright (C) 1991-2002 Linus Torvalds 8 */ 9#include "sched.h" 10 11#include <linux/nospec.h> 12 13#include <linux/kcov.h> |
14#include <linux/scs.h> |
|
14 15#include <asm/switch_to.h> 16#include <asm/tlb.h> 17 18#include "../workqueue_internal.h" 19#include "../../fs/io-wq.h" 20#include "../smpboot.h" 21 --- 1205 unchanged lines hidden (view full) --- 1227 1228 for_each_clamp_id(clamp_id) 1229 p->uclamp[clamp_id].active = false; 1230 1231 if (likely(!p->sched_reset_on_fork)) 1232 return; 1233 1234 for_each_clamp_id(clamp_id) { | 15 16#include <asm/switch_to.h> 17#include <asm/tlb.h> 18 19#include "../workqueue_internal.h" 20#include "../../fs/io-wq.h" 21#include "../smpboot.h" 22 --- 1205 unchanged lines hidden (view full) --- 1228 1229 for_each_clamp_id(clamp_id) 1230 p->uclamp[clamp_id].active = false; 1231 1232 if (likely(!p->sched_reset_on_fork)) 1233 return; 1234 1235 for_each_clamp_id(clamp_id) { |
1235 unsigned int clamp_value = uclamp_none(clamp_id); 1236 1237 /* By default, RT tasks always get 100% boost */ 1238 if (unlikely(rt_task(p) && clamp_id == UCLAMP_MIN)) 1239 clamp_value = uclamp_none(UCLAMP_MAX); 1240 1241 uclamp_se_set(&p->uclamp_req[clamp_id], clamp_value, false); | 1236 uclamp_se_set(&p->uclamp_req[clamp_id], 1237 uclamp_none(clamp_id), false); |
1242 } 1243} 1244 1245static void __init init_uclamp(void) 1246{ 1247 struct uclamp_se uc_max = {}; 1248 enum uclamp_id clamp_id; 1249 int cpu; --- 4790 unchanged lines hidden (view full) --- 6040 6041 raw_spin_lock_irqsave(&idle->pi_lock, flags); 6042 raw_spin_lock(&rq->lock); 6043 6044 idle->state = TASK_RUNNING; 6045 idle->se.exec_start = sched_clock(); 6046 idle->flags |= PF_IDLE; 6047 | 1238 } 1239} 1240 1241static void __init init_uclamp(void) 1242{ 1243 struct uclamp_se uc_max = {}; 1244 enum uclamp_id clamp_id; 1245 int cpu; --- 4790 unchanged lines hidden (view full) --- 6036 6037 raw_spin_lock_irqsave(&idle->pi_lock, flags); 6038 raw_spin_lock(&rq->lock); 6039 6040 idle->state = TASK_RUNNING; 6041 idle->se.exec_start = sched_clock(); 6042 idle->flags |= PF_IDLE; 6043 |
6044 scs_task_reset(idle); |
|
6048 kasan_unpoison_task_stack(idle); 6049 6050#ifdef CONFIG_SMP 6051 /* 6052 * Its possible that init_idle() gets called multiple times on a task, 6053 * in that case do_set_cpus_allowed() will not do the right thing. 6054 * 6055 * And since this is boot we can forgo the serialization. --- 1923 unchanged lines hidden --- | 6045 kasan_unpoison_task_stack(idle); 6046 6047#ifdef CONFIG_SMP 6048 /* 6049 * Its possible that init_idle() gets called multiple times on a task, 6050 * in that case do_set_cpus_allowed() will not do the right thing. 6051 * 6052 * And since this is boot we can forgo the serialization. --- 1923 unchanged lines hidden --- |