@@ -239,12 +239,12 @@ void cpuset_unlock(void)
239
239
240
240
static DEFINE_SPINLOCK (callback_lock );
241
241
242
- void callback_lock_irq (void )
242
+ void cpuset_callback_lock_irq (void )
243
243
{
244
244
spin_lock_irq (& callback_lock );
245
245
}
246
246
247
- void callback_unlock_irq (void )
247
+ void cpuset_callback_unlock_irq (void )
248
248
{
249
249
spin_unlock_irq (& callback_lock );
250
250
}
@@ -540,7 +540,7 @@ static int validate_change(struct cpuset *cur, struct cpuset *trial)
540
540
rcu_read_lock ();
541
541
542
542
if (!is_in_v2_mode ())
543
- ret = validate_change_legacy (cur , trial );
543
+ ret = cpuset1_validate_change (cur , trial );
544
544
if (ret )
545
545
goto out ;
546
546
@@ -1053,7 +1053,7 @@ void rebuild_sched_domains(void)
1053
1053
}
1054
1054
1055
1055
/**
1056
- * update_tasks_cpumask - Update the cpumasks of tasks in the cpuset.
1056
+ * cpuset_update_tasks_cpumask - Update the cpumasks of tasks in the cpuset.
1057
1057
* @cs: the cpuset in which each task's cpus_allowed mask needs to be changed
1058
1058
* @new_cpus: the temp variable for the new effective_cpus mask
1059
1059
*
@@ -1063,7 +1063,7 @@ void rebuild_sched_domains(void)
1063
1063
* is used instead of effective_cpus to make sure all offline CPUs are also
1064
1064
* included as hotplug code won't update cpumasks for tasks in top_cpuset.
1065
1065
*/
1066
- void update_tasks_cpumask (struct cpuset * cs , struct cpumask * new_cpus )
1066
+ void cpuset_update_tasks_cpumask (struct cpuset * cs , struct cpumask * new_cpus )
1067
1067
{
1068
1068
struct css_task_iter it ;
1069
1069
struct task_struct * task ;
@@ -1126,11 +1126,11 @@ static int update_partition_exclusive(struct cpuset *cs, int new_prs)
1126
1126
bool exclusive = (new_prs > PRS_MEMBER );
1127
1127
1128
1128
if (exclusive && !is_cpu_exclusive (cs )) {
1129
- if (update_flag (CS_CPU_EXCLUSIVE , cs , 1 ))
1129
+ if (cpuset_update_flag (CS_CPU_EXCLUSIVE , cs , 1 ))
1130
1130
return PERR_NOTEXCL ;
1131
1131
} else if (!exclusive && is_cpu_exclusive (cs )) {
1132
1132
/* Turning off CS_CPU_EXCLUSIVE will not return error */
1133
- update_flag (CS_CPU_EXCLUSIVE , cs , 0 );
1133
+ cpuset_update_flag (CS_CPU_EXCLUSIVE , cs , 0 );
1134
1134
}
1135
1135
return 0 ;
1136
1136
}
@@ -1380,7 +1380,7 @@ static int remote_partition_enable(struct cpuset *cs, int new_prs,
1380
1380
/*
1381
1381
* Proprogate changes in top_cpuset's effective_cpus down the hierarchy.
1382
1382
*/
1383
- update_tasks_cpumask (& top_cpuset , tmp -> new_cpus );
1383
+ cpuset_update_tasks_cpumask (& top_cpuset , tmp -> new_cpus );
1384
1384
update_sibling_cpumasks (& top_cpuset , NULL , tmp );
1385
1385
return 0 ;
1386
1386
}
@@ -1416,7 +1416,7 @@ static void remote_partition_disable(struct cpuset *cs, struct tmpmasks *tmp)
1416
1416
/*
1417
1417
* Proprogate changes in top_cpuset's effective_cpus down the hierarchy.
1418
1418
*/
1419
- update_tasks_cpumask (& top_cpuset , tmp -> new_cpus );
1419
+ cpuset_update_tasks_cpumask (& top_cpuset , tmp -> new_cpus );
1420
1420
update_sibling_cpumasks (& top_cpuset , NULL , tmp );
1421
1421
}
1422
1422
@@ -1468,7 +1468,7 @@ static void remote_cpus_update(struct cpuset *cs, struct cpumask *newmask,
1468
1468
/*
1469
1469
* Proprogate changes in top_cpuset's effective_cpus down the hierarchy.
1470
1470
*/
1471
- update_tasks_cpumask (& top_cpuset , tmp -> new_cpus );
1471
+ cpuset_update_tasks_cpumask (& top_cpuset , tmp -> new_cpus );
1472
1472
update_sibling_cpumasks (& top_cpuset , NULL , tmp );
1473
1473
return ;
1474
1474
@@ -1840,7 +1840,7 @@ static int update_parent_effective_cpumask(struct cpuset *cs, int cmd,
1840
1840
update_partition_exclusive (cs , new_prs );
1841
1841
1842
1842
if (adding || deleting ) {
1843
- update_tasks_cpumask (parent , tmp -> addmask );
1843
+ cpuset_update_tasks_cpumask (parent , tmp -> addmask );
1844
1844
update_sibling_cpumasks (parent , cs , tmp );
1845
1845
}
1846
1846
@@ -2023,7 +2023,7 @@ static void update_cpumasks_hier(struct cpuset *cs, struct tmpmasks *tmp,
2023
2023
/*
2024
2024
* update_parent_effective_cpumask() should have been called
2025
2025
* for cs already in update_cpumask(). We should also call
2026
- * update_tasks_cpumask () again for tasks in the parent
2026
+ * cpuset_update_tasks_cpumask () again for tasks in the parent
2027
2027
* cpuset if the parent's effective_cpus changes.
2028
2028
*/
2029
2029
if ((cp != cs ) && old_prs ) {
@@ -2080,7 +2080,7 @@ static void update_cpumasks_hier(struct cpuset *cs, struct tmpmasks *tmp,
2080
2080
WARN_ON (!is_in_v2_mode () &&
2081
2081
!cpumask_equal (cp -> cpus_allowed , cp -> effective_cpus ));
2082
2082
2083
- update_tasks_cpumask (cp , cp -> effective_cpus );
2083
+ cpuset_update_tasks_cpumask (cp , cp -> effective_cpus );
2084
2084
2085
2085
/*
2086
2086
* On default hierarchy, inherit the CS_SCHED_LOAD_BALANCE
@@ -2507,14 +2507,14 @@ static void cpuset_change_task_nodemask(struct task_struct *tsk,
2507
2507
static void * cpuset_being_rebound ;
2508
2508
2509
2509
/**
2510
- * update_tasks_nodemask - Update the nodemasks of tasks in the cpuset.
2510
+ * cpuset_update_tasks_nodemask - Update the nodemasks of tasks in the cpuset.
2511
2511
* @cs: the cpuset in which each task's mems_allowed mask needs to be changed
2512
2512
*
2513
2513
* Iterate through each task of @cs updating its mems_allowed to the
2514
2514
* effective cpuset's. As this function is called with cpuset_mutex held,
2515
2515
* cpuset membership stays stable.
2516
2516
*/
2517
- void update_tasks_nodemask (struct cpuset * cs )
2517
+ void cpuset_update_tasks_nodemask (struct cpuset * cs )
2518
2518
{
2519
2519
static nodemask_t newmems ; /* protected by cpuset_mutex */
2520
2520
struct css_task_iter it ;
@@ -2612,7 +2612,7 @@ static void update_nodemasks_hier(struct cpuset *cs, nodemask_t *new_mems)
2612
2612
WARN_ON (!is_in_v2_mode () &&
2613
2613
!nodes_equal (cp -> mems_allowed , cp -> effective_mems ));
2614
2614
2615
- update_tasks_nodemask (cp );
2615
+ cpuset_update_tasks_nodemask (cp );
2616
2616
2617
2617
rcu_read_lock ();
2618
2618
css_put (& cp -> css );
@@ -2699,15 +2699,15 @@ bool current_cpuset_is_being_rebound(void)
2699
2699
}
2700
2700
2701
2701
/*
2702
- * update_flag - read a 0 or a 1 in a file and update associated flag
2702
+ * cpuset_update_flag - read a 0 or a 1 in a file and update associated flag
2703
2703
* bit: the bit to update (see cpuset_flagbits_t)
2704
2704
* cs: the cpuset to update
2705
2705
* turning_on: whether the flag is being set or cleared
2706
2706
*
2707
2707
* Call with cpuset_mutex held.
2708
2708
*/
2709
2709
2710
- int update_flag (cpuset_flagbits_t bit , struct cpuset * cs ,
2710
+ int cpuset_update_flag (cpuset_flagbits_t bit , struct cpuset * cs ,
2711
2711
int turning_on )
2712
2712
{
2713
2713
struct cpuset * trialcs ;
@@ -2743,7 +2743,7 @@ int update_flag(cpuset_flagbits_t bit, struct cpuset *cs,
2743
2743
rebuild_sched_domains_locked ();
2744
2744
2745
2745
if (spread_flag_changed )
2746
- update_tasks_flags (cs );
2746
+ cpuset1_update_tasks_flags (cs );
2747
2747
out :
2748
2748
free_cpuset (trialcs );
2749
2749
return err ;
@@ -3008,7 +3008,7 @@ static void cpuset_attach_task(struct cpuset *cs, struct task_struct *task)
3008
3008
WARN_ON_ONCE (set_cpus_allowed_ptr (task , cpus_attach ));
3009
3009
3010
3010
cpuset_change_task_nodemask (task , & cpuset_attach_nodemask_to );
3011
- cpuset_update_task_spread_flags (cs , task );
3011
+ cpuset1_update_task_spread_flags (cs , task );
3012
3012
}
3013
3013
3014
3014
static void cpuset_attach (struct cgroup_taskset * tset )
@@ -3484,7 +3484,7 @@ static void cpuset_css_offline(struct cgroup_subsys_state *css)
3484
3484
3485
3485
if (!cgroup_subsys_on_dfl (cpuset_cgrp_subsys ) &&
3486
3486
is_sched_load_balance (cs ))
3487
- update_flag (CS_SCHED_LOAD_BALANCE , cs , 0 );
3487
+ cpuset_update_flag (CS_SCHED_LOAD_BALANCE , cs , 0 );
3488
3488
3489
3489
cpuset_dec ();
3490
3490
clear_bit (CS_ONLINE , & cs -> flags );
@@ -3623,7 +3623,7 @@ struct cgroup_subsys cpuset_cgrp_subsys = {
3623
3623
.can_fork = cpuset_can_fork ,
3624
3624
.cancel_fork = cpuset_cancel_fork ,
3625
3625
.fork = cpuset_fork ,
3626
- .legacy_cftypes = legacy_files ,
3626
+ .legacy_cftypes = cpuset1_files ,
3627
3627
.dfl_cftypes = dfl_files ,
3628
3628
.early_init = true,
3629
3629
.threaded = true,
@@ -3683,9 +3683,9 @@ hotplug_update_tasks(struct cpuset *cs,
3683
3683
spin_unlock_irq (& callback_lock );
3684
3684
3685
3685
if (cpus_updated )
3686
- update_tasks_cpumask (cs , new_cpus );
3686
+ cpuset_update_tasks_cpumask (cs , new_cpus );
3687
3687
if (mems_updated )
3688
- update_tasks_nodemask (cs );
3688
+ cpuset_update_tasks_nodemask (cs );
3689
3689
}
3690
3690
3691
3691
void cpuset_force_rebuild (void )
@@ -3786,7 +3786,7 @@ static void cpuset_hotplug_update_tasks(struct cpuset *cs, struct tmpmasks *tmp)
3786
3786
hotplug_update_tasks (cs , & new_cpus , & new_mems ,
3787
3787
cpus_updated , mems_updated );
3788
3788
else
3789
- hotplug_update_tasks_legacy (cs , & new_cpus , & new_mems ,
3789
+ cpuset1_hotplug_update_tasks (cs , & new_cpus , & new_mems ,
3790
3790
cpus_updated , mems_updated );
3791
3791
3792
3792
unlock :
@@ -3871,7 +3871,7 @@ static void cpuset_handle_hotplug(void)
3871
3871
top_cpuset .mems_allowed = new_mems ;
3872
3872
top_cpuset .effective_mems = new_mems ;
3873
3873
spin_unlock_irq (& callback_lock );
3874
- update_tasks_nodemask (& top_cpuset );
3874
+ cpuset_update_tasks_nodemask (& top_cpuset );
3875
3875
}
3876
3876
3877
3877
mutex_unlock (& cpuset_mutex );
0 commit comments