From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754562AbcHZQZY (ORCPT ); Fri, 26 Aug 2016 12:25:24 -0400 Received: from foss.arm.com ([217.140.101.70]:41798 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753029AbcHZQZW (ORCPT ); Fri, 26 Aug 2016 12:25:22 -0400 Date: Fri, 26 Aug 2016 17:25:16 +0100 From: Catalin Marinas To: Chris Metcalf Cc: Gilad Ben Yossef , Steven Rostedt , Ingo Molnar , Peter Zijlstra , Andrew Morton , Rik van Riel , Tejun Heo , Frederic Weisbecker , Thomas Gleixner , "Paul E. McKenney" , Christoph Lameter , Viresh Kumar , Will Deacon , Andy Lutomirski , Mark Rutland , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v15 08/13] arch/arm64: enable task isolation functionality Message-ID: <20160826162516.GC15779@e104818-lin.cambridge.arm.com> References: <1471382376-5443-1-git-send-email-cmetcalf@mellanox.com> <1471382376-5443-9-git-send-email-cmetcalf@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1471382376-5443-9-git-send-email-cmetcalf@mellanox.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 16, 2016 at 05:19:31PM -0400, Chris Metcalf wrote: > In do_notify_resume(), call task_isolation_ready() for > TIF_TASK_ISOLATION tasks when we are checking the thread-info flags; > and after we've handled the other work, call task_isolation_enter() > for such tasks. To ensure we always call task_isolation_enter() when > returning to userspace, add _TIF_TASK_ISOLATION to _TIF_WORK_MASK, > while leaving the old bitmask value as _TIF_WORK_LOOP_MASK to > check while looping. > > 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 we are about > to disturb one of them in strict or debug mode. > > Finally, report on page faults in task-isolation processes in > do_page_faults(). > > Signed-off-by: Chris Metcalf > --- > arch/arm64/Kconfig | 1 + > arch/arm64/include/asm/thread_info.h | 5 ++++- > arch/arm64/kernel/ptrace.c | 18 +++++++++++++++--- > arch/arm64/kernel/signal.c | 10 ++++++++++ > arch/arm64/kernel/smp.c | 2 ++ > arch/arm64/mm/fault.c | 8 +++++++- Not sure when/how this series will be merged (Will already picked patch 07/13 as a general clean-up) but this arm64 patch: Reviewed-by: Catalin Marinas