Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753611AbbEIKxg (ORCPT ); Sat, 9 May 2015 06:53:36 -0400 Received: from mail-db3on0064.outbound.protection.outlook.com ([157.55.234.64]:8331 "EHLO emea01-db3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752886AbbEIKxc (ORCPT ); Sat, 9 May 2015 06:53:32 -0400 X-Greylist: delayed 1196 seconds by postgrey-1.27 at vger.kernel.org; Sat, 09 May 2015 06:53:31 EDT From: Gilad Ben Yossef To: Andy Lutomirski , Chris Metcalf CC: "Srivatsa S. Bhat" , "Paul E. McKenney" , Frederic Weisbecker , "Ingo Molnar" , Rik van Riel , "linux-doc@vger.kernel.org" , Andrew Morton , "linux-kernel@vger.kernel.org" , Thomas Gleixner , "Tejun Heo" , Peter Zijlstra , Steven Rostedt , Christoph Lameter , Linux API Subject: RE: [PATCH 5/6] nohz: support PR_DATAPLANE_STRICT mode Thread-Topic: [PATCH 5/6] nohz: support PR_DATAPLANE_STRICT mode Thread-Index: AQHQibiwxnQHKWQGykOdalaE5u9LhZ1zQB0AgAAxJBA= Date: Sat, 9 May 2015 10:37:43 +0000 Message-ID: References: <1431107927-13998-1-git-send-email-cmetcalf@ezchip.com> <1431107927-13998-6-git-send-email-cmetcalf@ezchip.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: amacapital.net; dkim=none (message not signed) header.d=none; x-originating-ip: [202.111.50.2] x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:AM2PR02MB0769; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:AM2PR02MB0769;BCL:0;PCL:0;RULEID:;SRVR:AM2PR02MB0769; x-forefront-prvs: 05715BE7FD x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(6009001)(51704005)(24454002)(377454003)(74316001)(76176999)(50986999)(2656002)(62966003)(106116001)(76576001)(46102003)(2900100001)(5001960100002)(2950100001)(54356999)(66066001)(102836002)(33656002)(189998001)(5001920100001)(92566002)(5001770100001)(122556002)(87936001)(77156002)(40100003)(86362001)(19580405001)(19580395003)(4001450100001);DIR:OUT;SFP:1101;SCL:1;SRVR:AM2PR02MB0769;H:AM2PR02MB0417.eurprd02.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-OriginatorOrg: ezchip.com X-MS-Exchange-CrossTenant-originalarrivaltime: 09 May 2015 10:37:43.8550 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 0fc16e0a-3cd3-4092-8b2f-0a42cff122c3 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM2PR02MB0769 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by nfs id t49ArfdR032521 Content-Length: 2088 Lines: 35 > From: Andy Lutomirski [mailto:luto@amacapital.net] > Sent: Saturday, May 09, 2015 10:29 AM > To: Chris Metcalf > Cc: Srivatsa S. Bhat; Paul E. McKenney; Frederic Weisbecker; Ingo Molnar; > Rik van Riel; linux-doc@vger.kernel.org; Andrew Morton; linux- > kernel@vger.kernel.org; Thomas Gleixner; Tejun Heo; Peter Zijlstra; Steven > Rostedt; Christoph Lameter; Gilad Ben Yossef; Linux API > Subject: Re: [PATCH 5/6] nohz: support PR_DATAPLANE_STRICT mode > > On May 8, 2015 11:44 PM, "Chris Metcalf" wrote: > > > > With QUIESCE mode, the task is in principle guaranteed not to be > > interrupted by the kernel, but only if it behaves. In particular, > > if it enters the kernel via system call, page fault, or any of > > a number of other synchronous traps, it may be unexpectedly > > exposed to long latencies. Add a simple flag that puts the process > > into a state where any such kernel entry is fatal. > > > > To allow the state to be entered and exited, we add an internal > > bit to current->dataplane_flags that is set when prctl() sets the > > flags. That way, when we are exiting the kernel after calling > > prctl() to forbid future kernel exits, we don't get immediately > > killed. > > Is there any reason this can't already be addressed in userspace using > /proc/interrupts or perf_events? ISTM the real goal here is to detect > when we screw up and fail to avoid an interrupt, and killing the task > seems like overkill to me. > > Also, can we please stop further torturing the exit paths? So, I don't know if it is a practical suggestion or not, but would it better/easier to mark a pending signal on kernel entry for this case? The upsides I see is that the user gets her notification (killing the task or just logging the event in a signal handler) and hopefully since return to userspace with a pending signal is already handled we don't need new code in the exit path? Gilad ????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?