Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3528752ybc; Thu, 21 Nov 2019 09:37:45 -0800 (PST) X-Google-Smtp-Source: APXvYqziszHIpvrjsD3QnwQ254TXurqRozCmPGLg7lVXUiKwUpn97FqdZTEM/IcINNzWsOr3DRb9 X-Received: by 2002:a17:906:aad5:: with SMTP id kt21mr15065277ejb.228.1574357865526; Thu, 21 Nov 2019 09:37:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574357865; cv=none; d=google.com; s=arc-20160816; b=JjaEGgxpSittawYIYNnoAtCkxDEQ8cpnKMZ78UisNBQrVbp3rqOYh+4DpAdKU+dIVM zp3CUMoVADnc0FJdPUurqGOyqY4kn6ODIvfAeCK2SHOhICZn0URvUG2h5jDZBfraNeU5 F8Mytc79WbrkwAwwBp9AX2GohyL004tMPwwq+0OtgSqy4uzVv7zM4ag/NuFSS4Gtz8Sl IVs6qLw0WXi/t0JgDbE8ZCQefZYCG7zgfZGzJMgFyLfAD8z8nkZY9u4OuZLX67b2n9xc 4rmftfWtY3mvN34oTci7FT6rDUPJ7+aiwBSUOAzpUBmuI+iKHyLrfZxuW1rz9ezXZFDh MmWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=kT85EYnF8HVqmBD+sD5mv1wk+c/n8OFhrGY8G/TqmhQ=; b=uwLZSXQeNIBowCAsBT8tKEHNh2Hur+LyUsLxoacsrVuBco32j5AyZu3cp5hAceQCF5 hxhs2xDgmPR89ww5Nsm4Vs0Ry1t5GxqTKeiT7oh2dJWdsoq7+ynaHm6WsvZ+8yc4Frxh f2Q2g2R+2fc6uVLAyIcjUqPLpyqjtb2UUeMjv4jbbtFQVycUhLxiFm0HmSXBZwdQ92If bbrGCyUq5L6i/YR1W3Owq/g0I/yJKdMN7SkQediX6gAWCYUgxNxgrgaTGEo68KydXhgy cvQOJyZM0+i/TnRbeN2CsAegeMzSXcQHlD9Vwvysde9+Oy6HyNNFBpGr337orHBG0cAW 662w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b="a/E0I485"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v13si2037321ejq.36.2019.11.21.09.37.21; Thu, 21 Nov 2019 09:37:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b="a/E0I485"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726905AbfKURfQ (ORCPT + 99 others); Thu, 21 Nov 2019 12:35:16 -0500 Received: from merlin.infradead.org ([205.233.59.134]:57568 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726279AbfKURfQ (ORCPT ); Thu, 21 Nov 2019 12:35:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=kT85EYnF8HVqmBD+sD5mv1wk+c/n8OFhrGY8G/TqmhQ=; b=a/E0I485O72yRrViXyHzOa+hv cxyZeqYZeEtuT7frD0Pg5pbmQFf3f3CIuEIastTdK8rsT0R9c4KqotVfWEEXktP77e6rzAuHooZFp NawuZyC2S+FONuBVSJeFI/68eo06B+qvo1nOImUSQIIcNvGUYwO9KdapqwCa47LtoXMN0KG8yxBhN 0hRNoiPAeYLXFMIYoKoqeiw7RZJMvgRAKNveTaKNef3+yHmDxgnvpUymmXjNkg90YI0nSit929jYP YJQGn56Rx1jIwLVa+IlZQFxigKyXQ2nAeq691rML8mB+W6YkOjNjWK4eMwJdU7sROLL/hfHbWGnEq Ly2liGlcA==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1iXqMC-0006KW-AC; Thu, 21 Nov 2019 17:35:04 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 786B13056C8; Thu, 21 Nov 2019 18:33:50 +0100 (CET) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 414EC2021C978; Thu, 21 Nov 2019 18:35:01 +0100 (CET) Date: Thu, 21 Nov 2019 18:35:01 +0100 From: Peter Zijlstra To: Fenghua Yu Cc: Ingo Molnar , Thomas Gleixner , Ingo Molnar , Borislav Petkov , H Peter Anvin , Tony Luck , Ashok Raj , Ravi V Shankar , linux-kernel , x86 Subject: Re: [PATCH v10 6/6] x86/split_lock: Enable split lock detection by kernel parameter Message-ID: <20191121173501.GT4097@hirez.programming.kicks-ass.net> References: <1574297603-198156-1-git-send-email-fenghua.yu@intel.com> <1574297603-198156-7-git-send-email-fenghua.yu@intel.com> <20191121060444.GA55272@gmail.com> <20191121130153.GS4097@hirez.programming.kicks-ass.net> <20191121161410.GA199273@romley-ivt3.sc.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191121161410.GA199273@romley-ivt3.sc.intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 21, 2019 at 08:14:10AM -0800, Fenghua Yu wrote: > The usage scope of this patch set is largely reduced to only real time. > The long split lock processing time (>1000 cycles) cannot be tolerated > by real time. I'm thinking you're clueless on realtime. There's plenty of things that can cause many cycles to go out the window. And just a single instruction soaking up cycles like that really isn't the problem. The problem is that split lock defeats isolation. An otherwise contained task can have pretty horrific side effects on other tasks. > Real time customers do want to use this feature to detect the fatal > split lock error. They don't want any split lock issue from BIOS/EFI/ > firmware/kerne/drivers/user apps. Cloud vendors also don't want them. Nobody wants them, they stink. They have a system wide impact. I don't want them on my system. > > Imagine the BIOS/EFI/firmware containing an #AC exception. At that point > > the feature becomes useless, because you cannot enable it without your > > machine dying. > > I believe Intel real time team guarantees to deliever a split lock FREE > BIOS/EFI/firmware to their real time users. Not good enough. Any system shipping with this capability needs to have a split lock free firmware blob. And the only way to make that happen is to force enable it by default. > From kernel point of view, we are working on a split lock free kernel. > Some blocking split lock issues have been fixed in TIP tree. Haven't we fixed them all by now? > Only limited user apps can run on real time and should be split lock > free before they are allowed to run on the real time system. I'm thinking most of the normal Linux userspace will run just fine. Seeing how other architectures have rejected such nonsense forever. > In summary, the patch set only wants to enable the feature for real time > and disable it by default. We told you that wasn't good enough many times. Lot's of people run the preemp-rt kernel on lots of different hardware. And like I said, even cloudy folks would want this. Features that require special firmware that nobody has are useless. For giggles, run the below. You can notice your desktop getting slower. --- #include #include #include void main(void) { void *addr = mmap(NULL, 4096*2, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); unsigned int *var; if (addr == (void*)-1) { printf("fail\n"); return; } var = addr + 4096 - 2; for (;;) asm volatile ("lock incl %0" : : "m" (*var)); }