Skip to content

Commit 6f3f04c

Browse files
committed
Merge tag 'sched-core-2022-05-23' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull scheduler updates from Ingo Molnar: - Updates to scheduler metrics: - PELT fixes & enhancements - PSI fixes & enhancements - Refactor cpu_util_without() - Updates to instrumentation/debugging: - Remove sched_trace_*() helper functions - can be done via debug info - Fix double update_rq_clock() warnings - Introduce & use "preemption model accessors" to simplify some of the Kconfig complexity. - Make softirq handling RT-safe. - Misc smaller fixes & cleanups. * tag 'sched-core-2022-05-23' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: topology: Remove unused cpu_cluster_mask() sched: Reverse sched_class layout sched/deadline: Remove superfluous rq clock update in push_dl_task() sched/core: Avoid obvious double update_rq_clock warning smp: Make softirq handling RT safe in flush_smp_call_function_queue() smp: Rename flush_smp_call_function_from_idle() sched: Fix missing prototype warnings sched/fair: Remove cfs_rq_tg_path() sched/fair: Remove sched_trace_*() helper functions sched/fair: Refactor cpu_util_without() sched/fair: Revise comment about lb decision matrix sched/psi: report zeroes for CPU full at the system level sched/fair: Delete useless condition in tg_unthrottle_up() sched/fair: Fix cfs_rq_clock_pelt() for throttled cfs_rq sched/fair: Move calculate of avg_load to a better location mailmap: Update my email address to @redhat.com MAINTAINERS: Add myself as scheduler topology reviewer psi: Fix trigger being fired unexpectedly at initial ftrace: Use preemption model accessors for trace header printout kcsan: Use preemption model accessors
2 parents cfeb252 + 991d8d8 commit 6f3f04c

File tree

23 files changed

+213
-331
lines changed

23 files changed

+213
-331
lines changed

.mailmap

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,7 @@ Vasily Averin <vasily.averin@linux.dev> <vvs@virtuozzo.com>
398398
Vasily Averin <vasily.averin@linux.dev> <vvs@openvz.org>
399399
Vasily Averin <vasily.averin@linux.dev> <vvs@parallels.com>
400400
Vasily Averin <vasily.averin@linux.dev> <vvs@sw.ru>
401+
Valentin Schneider <vschneid@redhat.com> <valentin.schneider@arm.com>
401402
Vinod Koul <vkoul@kernel.org> <vinod.koul@intel.com>
402403
Vinod Koul <vkoul@kernel.org> <vinod.koul@linux.intel.com>
403404
Vinod Koul <vkoul@kernel.org> <vkoul@infradead.org>

Documentation/accounting/psi.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,7 @@ Pressure interface
3737
Pressure information for each resource is exported through the
3838
respective file in /proc/pressure/ -- cpu, memory, and io.
3939

40-
The format for CPU is as such::
41-
42-
some avg10=0.00 avg60=0.00 avg300=0.00 total=0
43-
44-
and for memory and IO::
40+
The format is as such::
4541

4642
some avg10=0.00 avg60=0.00 avg300=0.00 total=0
4743
full avg10=0.00 avg60=0.00 avg300=0.00 total=0
@@ -58,6 +54,9 @@ situation from a state where some tasks are stalled but the CPU is
5854
still doing productive work. As such, time spent in this subset of the
5955
stall state is tracked separately and exported in the "full" averages.
6056

57+
CPU full is undefined at the system level, but has been reported
58+
since 5.13, so it is set to zero for backward compatibility.
59+
6160
The ratios (in %) are tracked as recent trends over ten, sixty, and
6261
three hundred second windows, which gives insight into short term events
6362
as well as medium and long term trends. The total absolute stall time

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17524,6 +17524,7 @@ R: Steven Rostedt <rostedt@goodmis.org> (SCHED_FIFO/SCHED_RR)
1752417524
R: Ben Segall <bsegall@google.com> (CONFIG_CFS_BANDWIDTH)
1752517525
R: Mel Gorman <mgorman@suse.de> (CONFIG_NUMA_BALANCING)
1752617526
R: Daniel Bristot de Oliveira <bristot@redhat.com> (SCHED_DEADLINE)
17527+
R: Valentin Schneider <vschneid@redhat.com> (TOPOLOGY)
1752717528
L: linux-kernel@vger.kernel.org
1752817529
S: Maintained
1752917530
T: git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git sched/core

include/asm-generic/vmlinux.lds.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,13 +126,13 @@
126126
*/
127127
#define SCHED_DATA \
128128
STRUCT_ALIGN(); \
129-
__begin_sched_classes = .; \
130-
*(__idle_sched_class) \
131-
*(__fair_sched_class) \
132-
*(__rt_sched_class) \
133-
*(__dl_sched_class) \
129+
__sched_class_highest = .; \
134130
*(__stop_sched_class) \
135-
__end_sched_classes = .;
131+
*(__dl_sched_class) \
132+
*(__rt_sched_class) \
133+
*(__fair_sched_class) \
134+
*(__idle_sched_class) \
135+
__sched_class_lowest = .;
136136

137137
/* The actual configuration determine if the init/exit sections
138138
* are handled as text/data or they can be discarded (which

include/linux/interrupt.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -589,6 +589,15 @@ struct softirq_action
589589
asmlinkage void do_softirq(void);
590590
asmlinkage void __do_softirq(void);
591591

592+
#ifdef CONFIG_PREEMPT_RT
593+
extern void do_softirq_post_smp_call_flush(unsigned int was_pending);
594+
#else
595+
static inline void do_softirq_post_smp_call_flush(unsigned int unused)
596+
{
597+
do_softirq();
598+
}
599+
#endif
600+
592601
extern void open_softirq(int nr, void (*action)(struct softirq_action *));
593602
extern void softirq_init(void);
594603
extern void __raise_softirq_irqoff(unsigned int nr);

include/linux/sched.h

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2382,20 +2382,6 @@ static inline void rseq_syscall(struct pt_regs *regs)
23822382

23832383
#endif
23842384

2385-
const struct sched_avg *sched_trace_cfs_rq_avg(struct cfs_rq *cfs_rq);
2386-
char *sched_trace_cfs_rq_path(struct cfs_rq *cfs_rq, char *str, int len);
2387-
int sched_trace_cfs_rq_cpu(struct cfs_rq *cfs_rq);
2388-
2389-
const struct sched_avg *sched_trace_rq_avg_rt(struct rq *rq);
2390-
const struct sched_avg *sched_trace_rq_avg_dl(struct rq *rq);
2391-
const struct sched_avg *sched_trace_rq_avg_irq(struct rq *rq);
2392-
2393-
int sched_trace_rq_cpu(struct rq *rq);
2394-
int sched_trace_rq_cpu_capacity(struct rq *rq);
2395-
int sched_trace_rq_nr_running(struct rq *rq);
2396-
2397-
const struct cpumask *sched_trace_rd_span(struct root_domain *rd);
2398-
23992385
#ifdef CONFIG_SCHED_CORE
24002386
extern void sched_core_free(struct task_struct *tsk);
24012387
extern void sched_core_fork(struct task_struct *p);
@@ -2406,4 +2392,6 @@ static inline void sched_core_free(struct task_struct *tsk) { }
24062392
static inline void sched_core_fork(struct task_struct *p) { }
24072393
#endif
24082394

2395+
extern void sched_set_stop_task(int cpu, struct task_struct *stop);
2396+
24092397
#endif

include/linux/topology.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -240,13 +240,6 @@ static inline const struct cpumask *cpu_smt_mask(int cpu)
240240
}
241241
#endif
242242

243-
#if defined(CONFIG_SCHED_CLUSTER) && !defined(cpu_cluster_mask)
244-
static inline const struct cpumask *cpu_cluster_mask(int cpu)
245-
{
246-
return topology_cluster_cpumask(cpu);
247-
}
248-
#endif
249-
250243
static inline const struct cpumask *cpu_cpu_mask(int cpu)
251244
{
252245
return cpumask_of_node(cpu_to_node(cpu));

kernel/kcsan/kcsan_test.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1380,13 +1380,14 @@ static const void *nthreads_gen_params(const void *prev, char *desc)
13801380
else
13811381
nthreads *= 2;
13821382

1383-
if (!IS_ENABLED(CONFIG_PREEMPT) || !IS_ENABLED(CONFIG_KCSAN_INTERRUPT_WATCHER)) {
1383+
if (!preempt_model_preemptible() ||
1384+
!IS_ENABLED(CONFIG_KCSAN_INTERRUPT_WATCHER)) {
13841385
/*
13851386
* Without any preemption, keep 2 CPUs free for other tasks, one
13861387
* of which is the main test case function checking for
13871388
* completion or failure.
13881389
*/
1389-
const long min_unused_cpus = IS_ENABLED(CONFIG_PREEMPT_NONE) ? 2 : 0;
1390+
const long min_unused_cpus = preempt_model_none() ? 2 : 0;
13901391
const long min_required_cpus = 2 + min_unused_cpus;
13911392

13921393
if (num_online_cpus() < min_required_cpus) {

kernel/sched/build_policy.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
/* Headers: */
1616
#include <linux/sched/clock.h>
1717
#include <linux/sched/cputime.h>
18+
#include <linux/sched/hotplug.h>
1819
#include <linux/sched/posix-timers.h>
1920
#include <linux/sched/rt.h>
2021

@@ -31,6 +32,7 @@
3132
#include <uapi/linux/sched/types.h>
3233

3334
#include "sched.h"
35+
#include "smp.h"
3436

3537
#include "autogroup.h"
3638
#include "stats.h"

kernel/sched/build_utility.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include <linux/sched/debug.h>
1515
#include <linux/sched/isolation.h>
1616
#include <linux/sched/loadavg.h>
17+
#include <linux/sched/nohz.h>
1718
#include <linux/sched/mm.h>
1819
#include <linux/sched/rseq_api.h>
1920
#include <linux/sched/task_stack.h>

0 commit comments

Comments
 (0)