Hi Chris,
On Fri, Nov 03, 2017 at 01:04:48PM -0400, Chris Metcalf wrote:
In do_notify_resume(), call task_isolation_start() forI don't have much context for this (I only received patches 9, 10, and
TIF_TASK_ISOLATION tasks. Add _TIF_TASK_ISOLATION to _TIF_WORK_MASK,
and define a local NOTIFY_RESUME_LOOP_FLAGS to check in the loop,
since we don't clear _TIF_TASK_ISOLATION in the loop.
We tweak syscall_trace_enter() slightly to carry the "flags"
value from current_thread_info()->flags for each of the tests,
rather than doing a volatile read from memory for each one. This
avoids a small overhead for each test, and in particular avoids
that overhead for TIF_NOHZ when TASK_ISOLATION is not enabled.
We instrument the smp_send_reschedule() routine so that it checks for
isolated tasks and generates a suitable warning if needed.
Finally, report on page faults in task-isolation processes in
do_page_faults().
12), and this commit message doesn't help me to understand why these
changes are necessary.
Here we add to _TIF_WORK_MASK...
[...]
... and here we open-code the *old* _TIF_WORK_MASK.
Can we drop both in <asm/thread_info.h>, building one in terms of the
other:
#define _TIF_WORK_NOISOLATION_MASK \
(_TIF_NEED_RESCHED | _TIF_SIGPENDING | _TIF_NOTIFY_RESUME | \
_TIF_FOREIGN_FPSTATE | _TIF_UPROBE | _TIF_FSCHECK)
#define _TIF_WORK_MASK \
(_TIF_WORK_NOISOLATION_MASK | _TIF_TASK_ISOLATION)
... that avoids duplication, ensuring the two are kept in sync, and
makes it a little easier to understand.
@@ -818,6 +819,7 @@ void arch_send_call_function_single_ipi(int cpu)What exactly does this do? Is it some kind of a tracepoint?
#ifdef CONFIG_ARM64_ACPI_PARKING_PROTOCOL
void arch_send_wakeup_ipi_mask(const struct cpumask *mask)
{
+ task_isolation_remote_cpumask(mask, "wakeup IPI");
@@ -495,6 +496,10 @@ static int __kprobes do_page_fault(unsigned long addr, unsigned int esr,What exactly does the task receive here? Are these strings ABI?
*/
if (likely(!(fault & (VM_FAULT_ERROR | VM_FAULT_BADMAP |
VM_FAULT_BADACCESS)))) {
+ /* No signal was generated, but notify task-isolation tasks. */
+ if (user_mode(regs))
+ task_isolation_interrupt("page fault at %#lx", addr);
Do we need to do this for *every* exception?