On Tue, Jan 19, 2016 at 03:45:04PM -0500, Chris Metcalf wrote:
You asked what happens if nohz_full= is given as well, which is a veryI'd rather imagine that the final nohz full cpumask is "nohz_full=" | "task_isolation="
good question. Perhaps the right answer is to have an early_initcall
that suppresses task isolation on any cores that lost their nohz_full
or isolcpus status due to later boot command line arguments (and
generate a console warning, obviously).
That's the easiest way to deal with and both nohz and task isolation can call
a common initializer that takes care of the allocation and add the cpus to the mask.
There is nothing at all you can do and setting TIF_RESCHED won't help either.Well, I don't know that there is anything else we CAN do, right? If there's+bool _task_isolation_ready(void)I'm not sure doing this will help getting the tick to get stopped.
+{
+ WARN_ON_ONCE(!irqs_disabled());
+
+ /* If we need to drain the LRU cache, we're not ready. */
+ if (lru_add_drain_needed(smp_processor_id()))
+ return false;
+
+ /* If vmstats need updating, we're not ready. */
+ if (!vmstat_idle())
+ return false;
+
+ /* Request rescheduling unless we are in full dynticks mode. */
+ if (!tick_nohz_tick_stopped()) {
+ set_tsk_need_resched(current);
another task that can run, great - it may be that that's why full dynticks
isn't happening yet. Or, it might be that we're waiting for an RCU tick and
there's nothing else we can do, in which case we basically spend our time
going around through the scheduler code and back out to the
task_isolation_ready() test, but again, there's really nothing else more
useful we can be doing at this point. Once the RCU tick fires (or whatever
it was that was preventing full dynticks from engaging), we will pass this
test and return to user space.
If there is another task that can run, the scheduler takes care of resched
by itself :-)