On Fri, Oct 26, 2018 at 12:12:21AM +0530, Srikar Dronamraju wrote:
> @@ -4778,6 +4779,16 @@ long sched_setaffinity(pid_t pid, const struct cpumask 
> *in_mask)
>  
>       cpuset_cpus_allowed(p, cpus_allowed);
>       cpumask_and(new_mask, in_mask, cpus_allowed);
> +     hk_mask = housekeeping_cpumask(HK_FLAG_DOMAIN);
> +
> +     /*
> +      * Warn if the cpumask provided has CPUs that are part of isolated and
> +      * housekeeping_cpumask
> +      */
> +     if (!cpumask_subset(new_mask, hk_mask) &&
> +                     cpumask_intersects(new_mask, hk_mask))
> +             pr_warn("pid %d: Mix of isolcpus and non-isolcpus provided\n",
> +                     p->pid);
>  
>       /*
>        * Since bandwidth control happens on root_domain basis,

That is horribly coding style, and completely pointless. Also user
trigerable printl like that should be rate limited at the very least.

Reply via email to