From: Peter Zijlstra <peterz@infradead.org>
To: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Cc: Ingo Molnar <mingo@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Mel Gorman <mgorman@techsingularity.net>,
Rik van Riel <riel@surriel.com>,
Thomas Gleixner <tglx@linutronix.de>, Wang <wang.yi59@zte.com.cn>,
zhong.weidong@zte.com.cn, Yi Liu <liu.yi24@zte.com.cn>,
Frederic Weisbecker <frederic@kernel.org>
Subject: Re: [PATCH v3 1/3] sched/core: Warn if cpumask has a mix of isolcpus and housekeeping CPUs
Date: Fri, 26 Oct 2018 10:32:35 +0200 [thread overview]
Message-ID: <20181026083235.GW3109@worktop.c.hoisthospitality.com> (raw)
In-Reply-To: <1540492943-17147-2-git-send-email-srikar@linux.vnet.ibm.com>
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.
next prev parent reply other threads:[~2018-10-26 8:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-25 18:42 [PATCH v3 0/3] isolcpus Srikar Dronamraju
2018-10-25 18:42 ` [PATCH v3 1/3] sched/core: Warn if cpumask has a mix of isolcpus and housekeeping CPUs Srikar Dronamraju
2018-10-26 8:32 ` Peter Zijlstra [this message]
2018-10-25 18:42 ` [PATCH v3 2/3] sched/core: Don't mix " Srikar Dronamraju
2018-10-26 8:33 ` Peter Zijlstra
2018-10-25 18:42 ` [PATCH v3 3/3] sched/core: Error out if cpumask has a mix of " Srikar Dronamraju
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181026083235.GW3109@worktop.c.hoisthospitality.com \
--to=peterz@infradead.org \
--cc=frederic@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liu.yi24@zte.com.cn \
--cc=mgorman@techsingularity.net \
--cc=mingo@kernel.org \
--cc=riel@surriel.com \
--cc=srikar@linux.vnet.ibm.com \
--cc=tglx@linutronix.de \
--cc=wang.yi59@zte.com.cn \
--cc=zhong.weidong@zte.com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).