Skip to content

Commit 5dcad50

Browse files
committed
Merge branch 'for-6.3-fixes' into for-6.4
To receive 292fd84 ("cgroup/cpuset: Fix partition root's cpuset.cpus update bug") in preparation for further cpuset updates.
2 parents 8e46452 + 292fd84 commit 5dcad50

2 files changed

Lines changed: 11 additions & 5 deletions

File tree

kernel/cgroup/cpuset.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1513,7 +1513,7 @@ static int update_parent_subparts_cpumask(struct cpuset *cs, int cmd,
15131513
spin_unlock_irq(&callback_lock);
15141514

15151515
if (adding || deleting)
1516-
update_tasks_cpumask(parent, tmp->new_cpus);
1516+
update_tasks_cpumask(parent, tmp->addmask);
15171517

15181518
/*
15191519
* Set or clear CS_SCHED_LOAD_BALANCE when partcmd_update, if necessary.
@@ -1770,10 +1770,13 @@ static int update_cpumask(struct cpuset *cs, struct cpuset *trialcs,
17701770
/*
17711771
* Use the cpumasks in trialcs for tmpmasks when they are pointers
17721772
* to allocated cpumasks.
1773+
*
1774+
* Note that update_parent_subparts_cpumask() uses only addmask &
1775+
* delmask, but not new_cpus.
17731776
*/
17741777
tmp.addmask = trialcs->subparts_cpus;
17751778
tmp.delmask = trialcs->effective_cpus;
1776-
tmp.new_cpus = trialcs->cpus_allowed;
1779+
tmp.new_cpus = NULL;
17771780
#endif
17781781

17791782
retval = validate_change(cs, trialcs);
@@ -1838,6 +1841,11 @@ static int update_cpumask(struct cpuset *cs, struct cpuset *trialcs,
18381841
}
18391842
spin_unlock_irq(&callback_lock);
18401843

1844+
#ifdef CONFIG_CPUMASK_OFFSTACK
1845+
/* Now trialcs->cpus_allowed is available */
1846+
tmp.new_cpus = trialcs->cpus_allowed;
1847+
#endif
1848+
18411849
/* effective_cpus will be updated here */
18421850
update_cpumasks_hier(cs, &tmp, false);
18431851

kernel/cgroup/rstat.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -457,9 +457,7 @@ static void root_cgroup_cputime(struct cgroup_base_stat *bstat)
457457
struct task_cputime *cputime = &bstat->cputime;
458458
int i;
459459

460-
cputime->stime = 0;
461-
cputime->utime = 0;
462-
cputime->sum_exec_runtime = 0;
460+
memset(bstat, 0, sizeof(*bstat));
463461
for_each_possible_cpu(i) {
464462
struct kernel_cpustat kcpustat;
465463
u64 *cpustat = kcpustat.cpustat;

0 commit comments

Comments
 (0)