From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752564AbcJABzX (ORCPT ); Fri, 30 Sep 2016 21:55:23 -0400 Received: from mail-db5eur01on0066.outbound.protection.outlook.com ([104.47.2.66]:31360 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750864AbcJABzU (ORCPT ); Fri, 30 Sep 2016 21:55:20 -0400 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=cmetcalf@mellanox.com; Subject: Re: Ping: [PATCH v15 00/13] support "task_isolation" mode To: Frederic Weisbecker References: <1471382376-5443-1-git-send-email-cmetcalf@mellanox.com> <20160927143511.GD6242@lerouge> CC: Gilad Ben Yossef , Steven Rostedt , Ingo Molnar , Peter Zijlstra , Andrew Morton , "Rik van Riel" , Tejun Heo , Thomas Gleixner , "Paul E. McKenney" , Christoph Lameter , Viresh Kumar , Catalin Marinas , Will Deacon , Andy Lutomirski , Daniel Lezcano , Francis Giraldeau , , , From: Chris Metcalf Message-ID: Date: Fri, 30 Sep 2016 13:07:33 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <20160927143511.GD6242@lerouge> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [12.216.194.146] X-ClientProxiedBy: BLUPR0201CA0034.namprd02.prod.outlook.com (10.163.116.44) To AM4PR0501MB2754.eurprd05.prod.outlook.com (10.172.216.10) X-MS-Office365-Filtering-Correlation-Id: 2bcab337-b309-4f45-c023-08d3e9544c3a X-Microsoft-Exchange-Diagnostics: 1;AM4PR0501MB2754;2:4Xr0UAPlUAG+CxTlI5c8bLrYPisU6GE/8Cgi0nPOfha7tdUgZJHha3Du6LGrkeDcVz6QxDW8jOQBMKGkuSn6Njr8qcGqByoQOeWyz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pJA8aSnqQbjIR64BykS5Imj56MdZVAFcBtshQXYCcE7NdfjhbCrLnb7jUT6QYBLVDsZ1O35sBcOt9ZwBK9NsV8AvWzYFiDCQofGEBhF0OUnyICmKTFkEkKi7wUMVSIG5/0D0eTeOzz7QzEf6VmCi0Ho+x+zpzcYsxBwH7Z2yh2rvBaCQukoJ1CJSr2uTS9KJg/Gj2LeTaxYn2EUDGAUf/TZ+TN1Ic4yB1Rszu+UPDqm14+Jo3TIAS+iT3IJHJHRLRGVdp9/4n6ZyYbL/CLEHaqv8W6MOjKMrPqaf45UEL3x0iStG5afwnCsviApqgTtD24Xwbp9smppG67s3Y6O2cUBppvvGVf3ETI9tQTSDgwqSuhx83fYjWDAxOg5Ed99/yUh340a/fizqscldvgQ0LkRW8TX X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(171992500451332); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040176)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6055026);SRVR:AM4PR0501MB2754;BCL:0;PCL:0;RULEID:;SRVR:AM4PR0501MB2754; X-Microsoft-Exchange-Diagnostics: 1;AM4PR0501MB2754;4:mAVcNuolB5LGje+ZDSvyY8I1POSH0S6eBhFGmWCY3lHJVSP0YVDAsM1pO+GIEfoLC8d6wno+etAzkED7YIq+WDUOE6UBu2I1r2XCG/2KRma3aoAlVgrXso68QoUfJi33L6woYayFkSJWEl2BDpyY8qftLMzQ0a/sgWeVS4VoNDdj/MD1shn+dwWFg+ZkMOeFdpOSeKj7ZIpt7RqFGoenrWy5YI+SXAPfgX7s7uW4AtDJy53TDX31ImRUc09po7UhUN2xM+q3lUrYFz2BeV0M5m1XVIHEsosWuZNhe1OcElqZbiG77eRFVDI2UqV5qD7L+enipHz6dF3XV1dezIIHeJHd1/AFCYAu5Bv6if2mRYh1vOkyjkEsZU7XDvCieXwInmc/TyG8I5BPqsJDV68ltCHdMPbiRkDHLfh69HSaQm/X8Z9ZIbzGWoe5XX2PpgFu X-Forefront-PRVS: 008184426E X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6049001)(6009001)(7916002)(189002)(377454003)(199003)(76104003)(24454002)(15975445007)(105586002)(65826007)(106356001)(6666003)(110136003)(50986999)(4001350100001)(54356999)(7416002)(86362001)(31696002)(68736007)(5660300001)(76176999)(97736004)(36756003)(65806001)(42186005)(47776003)(189998001)(31686004)(50466002)(77096005)(101416001)(66066001)(65956001)(8676002)(92566002)(3846002)(64126003)(81166006)(586003)(81156014)(305945005)(1411001)(2950100002)(23746002)(2906002)(33646002)(4326007)(19580395003)(6916009)(6116002)(230700001)(7736002)(7846002)(83506001)(18886065003);DIR:OUT;SFP:1101;SCL:1;SRVR:AM4PR0501MB2754;H:[10.15.7.181];FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;AM4PR0501MB2754;23:CSc61zkY0vVfW4QMtq24Ka+4/zwQNdp7ADs?= =?Windows-1252?Q?Vat3escaDHJeBFN8fqyeIB2jFYsS3A326Y7nc1HlpMAz4V+RrS8cgHW6?= =?Windows-1252?Q?TtnUs0G7kFZDQUbfV6npIIg2LUq51iSLYbYFoUVHHQN0QraJ7gvWyJ0X?= =?Windows-1252?Q?fr0kBzmeQd7S2p6kmC1vSQbE5EqMmgZA1zPPlvli7P0XkURIT9suQ26H?= =?Windows-1252?Q?AjexxSnV0qzF99LBw0SaWXtCkxGndjmQFusORHKdO+nvsg1mFbZQcrzZ?= =?Windows-1252?Q?ToVKhz6hRjmCby3ips6xPa37u0/BwmztYX+ZhHbc5RFOCiKupZskzYEd?= =?Windows-1252?Q?U1EmdEnW0Y95bI71hBsdDWKe3KDJoGoKh73xZ6D4NhDXmokuZHlYCGVz?= =?Windows-1252?Q?5YuCWCg+f7CVlv67qoNK5S1YYSV3Y85nWG4/Z0sf4v5XB1YroRnjzU8f?= =?Windows-1252?Q?70nb+oyet6sfdD/UQJo0xLwe9UHOiE/Gaa2gsQ8stDE1Z8euSAqWQvVM?= =?Windows-1252?Q?6aTEhNIwu84i11AHfWrApuwq05mxQSwmW5lJ678/2c6bQUwFkg+ycI37?= =?Windows-1252?Q?HiGS4W8ixef/tn3jZpS5JkV9l5tglwSvPtM4u1FLJU8Cl+Aec/1x0t7i?= =?Windows-1252?Q?njX5h+yhY0N9HbcHk5FnH35ejX1xdR5ZhpK3gS76SvsXr2GG3k3vI2rE?= =?Windows-1252?Q?3UfL4I+lcyPQKPWGfmKRA+743A7bDvqIcP+seTBdU+18wO6DM1mhPogz?= =?Windows-1252?Q?LS07n0dovwtUA6rwflofnDUfdEGMABaWKzIveIDjAEXVkc9er8oq9uRR?= =?Windows-1252?Q?o25KuRkDhRpzAGsByfx6lzswrv3I6Vfpbbk3+Fnp94Z4cv4h2I0pv2pD?= =?Windows-1252?Q?oU/fYUBfBkd2ZXgH4Y1Z4apGhac/GOsGt4n4bsB4d0MJIGq03gZGhJmn?= =?Windows-1252?Q?zM7UT7YulJdlWYyQo8mm1pnNHdQf43M3PGWeO13ESdw5EslbLWfPjLy4?= =?Windows-1252?Q?q9Ftg3SDgPtxO1ubAHXg9ZW6QBnZIo/GyYKykGDnAwvGEzSJLGEPaT9u?= =?Windows-1252?Q?ei/flnaNv4VRpZET6GB+a1h9pGx0as1xMBgFc941IdYV617j+msk7diA?= =?Windows-1252?Q?Aq/PwHkpeeUL4pod/4ZdOdee8zMLB0c+w/o2/MBuL3VNfPTNqxvZPnbU?= =?Windows-1252?Q?y5AX+cgrFu0GHIjkeGaxp3/LYvsQr1jgK9ZR/kFKBzuED5r/JrvuV3TD?= =?Windows-1252?Q?YCshoB4YXBlV43XWFSwcWpd6sWyyrRd4JG4Xemjt6UVJlNf8a7Ix2N5H?= =?Windows-1252?Q?gVXnrdT5UQpoRf2QYimCjlvq6xaBgB5Cj+3FZsa29Z/0YwlTtHPL1zRC?= =?Windows-1252?Q?xcBmP6kSRwmFpQWcW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FuodcNHM7iZBOfEpW26nUrfw4lDzVsi0DQSp9WZmRW2fjeVR8k9Juw0xVCgednsSEDO13zrzYY5mizV7liby5QFW+Ad SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Sep 2016 17:07:43.1375 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR0501MB2754 X-Microsoft-Exchange-Diagnostics: 1;AM4PR0501MB2754;23:Fj72ggcqrCG4ooB/Ph7aJgu5zcaRr0tgaZvRhEfKSoku+lQn+9VkCK3cT7jiK2YoZEhQOmc2fdKHKL8cKvoAPpPCNmT2xpua4onrmi1ncSjhWGd8mUMdbN/RIWq9w2uAPLR0cqgrjKzoKAlPJeyO5Xj1C32vAQ545++oByWjM5ao3tSkbAg6j9lBV0CXsahx X-OriginatorOrg: Mellanox.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/27/2016 10:35 AM, Frederic Weisbecker wrote: > On 8/16/2016 5:19 PM, Chris Metcalf wrote: >>> Here is a respin of the task-isolation patch set. >>> >>> Again, I have been getting email asking me when and where this patch >>> will be upstreamed so folks can start using it. I had been thinking >>> the obvious path was via Frederic Weisbecker to Ingo as a NOHZ kind of >>> thing. But perhaps it touches enough other subsystems that that >>> doesn't really make sense? Andrew, would it make sense to take it >>> directly via your tree? Frederic, Ingo, what do you think? > As it seems we are still debating a lot of things in this patchset that has already > reached v15, I think you should split it in smaller steps in order to move forward > and only get into the next step once the previous is merged. > > You could start with a first batch that introduces the prctl() and does the best effort > one-shot isolation part. Which means the actions that only need to be performed once > on the prctl call. So combining this with my reply a moment ago to Andy about just disabling all deferrable work creation on task isolation cores, that means we just need a way of checking that the dyntick is off on return from the prctl. We could do this in the prctl() itself, but it feels a bit fragile, since we could do the check for no dyntick and try to return success, and then some kind of interrupt and/or schedule event might happen and by the time we actually got back to userspace the dyntick might be running again. I think what we can do is arrange to set a bit in the process state that says we are returning from prctl, and then right as we are returning to userspace with interrupts disabled, we can check if that bit is set, and if so check at that point to see if the dyntick is enabled, and if it is, force the syscall return value to EAGAIN (and clear the bit regardless). Within the prctl() code itself, we check for hard prerequisites like being on a task-isolation cpu, and fail -EINVAL if not. The upshot is that we end up spinning on a loop through userspace where we keep retrying the prctl() until the timer quiesces. > Once we get that merged we can focus on what needs to be performed on every return > to userspace if that's really needed. Including possibly waiting on some completion. So in NOSIG mode, instead of setting EAGAIN in the return to userspace path, we arrange to just wait. We can figure out in a follow-on patch whether we want to wait by spinning in some way or by actually waiting on a completion. For now I'll just include the remainder of the patch (with spinning) as an RFC just so people can have the next piece to look ahead to, but I like your idea of breaking it out of the main patch series entirely. -- Chris Metcalf, Mellanox Technologies http://www.mellanox.com