Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1946308AbbEOVZb (ORCPT ); Fri, 15 May 2015 17:25:31 -0400 Received: from mail-db3on0082.outbound.protection.outlook.com ([157.55.234.82]:60952 "EHLO emea01-db3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1946011AbbEOVZZ (ORCPT ); Fri, 15 May 2015 17:25:25 -0400 Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none; Message-ID: <55566436.40002@ezchip.com> Date: Fri, 15 May 2015 17:25:10 -0400 From: Chris Metcalf User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Andy Lutomirski CC: "Paul E. McKenney" , Frederic Weisbecker , "linux-kernel@vger.kernel.org" , Rik van Riel , Andrew Morton , Linux API , Thomas Gleixner , Tejun Heo , Peter Zijlstra , Steven Rostedt , "linux-doc@vger.kernel.org" , Christoph Lameter , Gilad Ben Yossef , Ingo Molnar Subject: Re: [PATCH 5/6] nohz: support PR_DATAPLANE_STRICT mode References: <1431107927-13998-1-git-send-email-cmetcalf@ezchip.com> <1431107927-13998-6-git-send-email-cmetcalf@ezchip.com> <5550FF63.1030107@ezchip.com> <55526B39.10208@ezchip.com> In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [12.216.194.146] X-ClientProxiedBy: BN3PR0401CA0010.namprd04.prod.outlook.com (25.162.159.148) To VI1PR02MB0783.eurprd02.prod.outlook.com (25.162.14.145) X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:VI1PR02MB0783; 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:VI1PR02MB0783;BCL:0;PCL:0;RULEID:;SRVR:VI1PR02MB0783; X-Forefront-PRVS: 0577AD41D6 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6049001)(6009001)(377454003)(51414003)(24454002)(51704005)(479174004)(93886004)(86362001)(42186005)(87976001)(50466002)(46102003)(4001350100001)(40100003)(5001960100002)(110136002)(117636001)(189998001)(19580405001)(77096005)(65956001)(66066001)(47776003)(2950100001)(83506001)(15975445007)(122386002)(19580395003)(36756003)(54356999)(92566002)(77156002)(62966003)(65816999)(23676002)(76176999)(50986999)(62816006)(18886065003);DIR:OUT;SFP:1101;SCL:1;SRVR:VI1PR02MB0783;H:[10.7.0.41];FPR:;SPF:None;MLV:sfv;LANG:en; X-OriginatorOrg: ezchip.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 May 2015 21:25:19.5804 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR02MB0783 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2491 Lines: 52 On 05/12/2015 06:23 PM, Andy Lutomirski wrote: > On May 13, 2015 6:06 AM, "Chris Metcalf" wrote: >> On 05/11/2015 06:28 PM, Andy Lutomirski wrote: >>> On Mon, May 11, 2015 at 12:13 PM, Chris Metcalf wrote: >>>> In this case, killing the task is appropriate, since that's exactly >>>> the semantics that have been asked for - it's like on architectures >>>> that don't natively support unaligned accesses, but fake it relatively >>>> slowly in the kernel, and in development you just say "give me a >>>> SIGBUS when that happens" and in production you might say >>>> "fix it up and let's try to keep going". >>> I think more control is needed. I also think that, if we go this >>> route, we should distinguish syscalls, synchronous non-syscall >>> entries, and asynchronous non-syscall entries. They're quite >>> different. >> >> I don't think it's necessary to distinguish the types. As long as we >> have a PC pointing to the instruction that triggered the problem, >> we can see if it's a system call instruction, a memory write that >> caused a page fault, a trap instruction, etc. > Not true. PC right after a syscall insn could be any type of kernel > entry, and you can't even reliably tell whether the syscall insn was > executed or, on x86, whether it was a syscall at all. (x86 insns > can't be reliably decided backwards.) > > PC pointing at a load could be a page fault or an IPI. All that we are trying to do with this API, though, is distinguish synchronous faults. So IPIs, etc., should not be happening (they would be bugs), and hopefully we are mostly just distinguishing different types of synchronous program entries. That said, I did a si_info flag to differentiate syscalls from other synchronous entries, and I'm open to looking at more such if it seems useful. > Again, though, I think we really do need to distinguish at least MCE > and NMI (on x86) from the others. Yes, those are both interesting cases, and I'm not entirely sure what the right way to handle them is - for example, likely disable STRICT if you are running with perf enabled. I look forward to hearing more when you're back next week! -- Chris Metcalf, EZChip Semiconductor http://www.ezchip.com -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/