Lines Matching refs:trialcs
2290 * @trialcs: trial cpuset
2293 static int update_cpumask(struct cpuset *cs, struct cpuset *trialcs,
2314 cpumask_clear(trialcs->cpus_allowed);
2315 if (cpumask_empty(trialcs->exclusive_cpus))
2316 cpumask_clear(trialcs->effective_xcpus);
2318 retval = cpulist_parse(buf, trialcs->cpus_allowed);
2322 if (!cpumask_subset(trialcs->cpus_allowed,
2329 * trialcs->effective_xcpus is used as a temporary cpumask
2332 trialcs->partition_root_state = PRS_MEMBER;
2333 if (!cpumask_empty(trialcs->exclusive_cpus) || is_partition_valid(cs))
2334 compute_effective_exclusive_cpumask(trialcs, NULL, cs);
2338 if (cpumask_equal(cs->cpus_allowed, trialcs->cpus_allowed))
2346 cpumask_empty(trialcs->effective_xcpus)) {
2349 } else if (prstate_housekeeping_conflict(old_prs, trialcs->effective_xcpus)) {
2352 } else if (tasks_nocpu_error(parent, cs, trialcs->effective_xcpus)) {
2362 force = !cpumask_equal(cs->effective_xcpus, trialcs->effective_xcpus);
2364 retval = validate_change(cs, trialcs);
2380 struct cpumask *xcpus = user_xcpus(trialcs);
2398 struct cpumask *xcpus = trialcs->effective_xcpus;
2401 xcpus = trialcs->cpus_allowed;
2417 cpumask_copy(cs->cpus_allowed, trialcs->cpus_allowed);
2418 cpumask_copy(cs->effective_xcpus, trialcs->effective_xcpus);
2437 * @trialcs: trial cpuset
2442 static int update_exclusive_cpumask(struct cpuset *cs, struct cpuset *trialcs,
2453 cpumask_clear(trialcs->exclusive_cpus);
2454 cpumask_clear(trialcs->effective_xcpus);
2456 retval = cpulist_parse(buf, trialcs->exclusive_cpus);
2462 if (cpumask_equal(cs->exclusive_cpus, trialcs->exclusive_cpus))
2466 trialcs->partition_root_state = PRS_MEMBER;
2471 if (compute_effective_exclusive_cpumask(trialcs, NULL, cs))
2479 force = !cpumask_equal(cs->effective_xcpus, trialcs->effective_xcpus);
2481 retval = validate_change(cs, trialcs);
2489 if (cpumask_empty(trialcs->effective_xcpus)) {
2492 } else if (prstate_housekeeping_conflict(old_prs, trialcs->effective_xcpus)) {
2495 } else if (tasks_nocpu_error(parent, cs, trialcs->effective_xcpus)) {
2504 remote_cpus_update(cs, trialcs->exclusive_cpus,
2505 trialcs->effective_xcpus, &tmp);
2511 trialcs->effective_xcpus, &tmp);
2515 cpumask_copy(cs->exclusive_cpus, trialcs->exclusive_cpus);
2516 cpumask_copy(cs->effective_xcpus, trialcs->effective_xcpus);
2747 static int update_nodemask(struct cpuset *cs, struct cpuset *trialcs,
2768 nodes_clear(trialcs->mems_allowed);
2770 retval = nodelist_parse(buf, trialcs->mems_allowed);
2774 if (!nodes_subset(trialcs->mems_allowed,
2781 if (nodes_equal(cs->mems_allowed, trialcs->mems_allowed)) {
2785 retval = validate_change(cs, trialcs);
2789 check_insane_mems_config(&trialcs->mems_allowed);
2792 cs->mems_allowed = trialcs->mems_allowed;
2795 /* use trialcs->mems_allowed as a temp variable */
2796 update_nodemasks_hier(cs, &trialcs->mems_allowed);
2824 struct cpuset *trialcs;
2829 trialcs = alloc_trial_cpuset(cs);
2830 if (!trialcs)
2834 set_bit(bit, &trialcs->flags);
2836 clear_bit(bit, &trialcs->flags);
2838 err = validate_change(cs, trialcs);
2843 is_sched_load_balance(trialcs));
2845 spread_flag_changed = ((is_spread_slab(cs) != is_spread_slab(trialcs))
2846 || (is_spread_page(cs) != is_spread_page(trialcs)));
2849 cs->flags = trialcs->flags;
2852 if (!cpumask_empty(trialcs->cpus_allowed) && balance_flag_changed) {
2862 free_cpuset(trialcs);
3223 struct cpuset *trialcs;
3232 trialcs = alloc_trial_cpuset(cs);
3233 if (!trialcs) {
3240 retval = update_cpumask(cs, trialcs, buf);
3243 retval = update_exclusive_cpumask(cs, trialcs, buf);
3246 retval = update_nodemask(cs, trialcs, buf);
3253 free_cpuset(trialcs);