File tree Expand file tree Collapse file tree 1 file changed +7
-21
lines changed
arch/x86/kernel/cpu/resctrl Expand file tree Collapse file tree 1 file changed +7
-21
lines changed Original file line number Diff line number Diff line change 47
47
static inline unsigned int
48
48
cpumask_any_housekeeping (const struct cpumask * mask , int exclude_cpu )
49
49
{
50
- unsigned int cpu , hk_cpu ;
51
-
52
- if (exclude_cpu == RESCTRL_PICK_ANY_CPU )
53
- cpu = cpumask_any (mask );
54
- else
55
- cpu = cpumask_any_but (mask , exclude_cpu );
56
-
57
- /* Only continue if tick_nohz_full_mask has been initialized. */
58
- if (!tick_nohz_full_enabled ())
59
- return cpu ;
60
-
61
- /* If the CPU picked isn't marked nohz_full nothing more needs doing. */
62
- if (cpu < nr_cpu_ids && !tick_nohz_full_cpu (cpu ))
63
- return cpu ;
50
+ unsigned int cpu ;
64
51
65
52
/* Try to find a CPU that isn't nohz_full to use in preference */
66
- hk_cpu = cpumask_nth_andnot (0 , mask , tick_nohz_full_mask );
67
- if (hk_cpu == exclude_cpu )
68
- hk_cpu = cpumask_nth_andnot (1 , mask , tick_nohz_full_mask );
69
-
70
- if (hk_cpu < nr_cpu_ids )
71
- cpu = hk_cpu ;
53
+ if (tick_nohz_full_enabled ()) {
54
+ cpu = cpumask_any_andnot_but (mask , tick_nohz_full_mask , exclude_cpu );
55
+ if (cpu < nr_cpu_ids )
56
+ return cpu ;
57
+ }
72
58
73
- return cpu ;
59
+ return cpumask_any_but ( mask , exclude_cpu ) ;
74
60
}
75
61
76
62
struct rdt_fs_context {
You can’t perform that action at this time.
0 commit comments