Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2830546ybc; Wed, 20 Nov 2019 22:08:20 -0800 (PST) X-Google-Smtp-Source: APXvYqxqMyVoyhUc/bdi0rJDRtWOhlaIdplJ2sPtsbNgAnyIeBNjEcrJ5QVJvtGCPwTAuZF3nGho X-Received: by 2002:a17:906:948a:: with SMTP id t10mr11344081ejx.110.1574316500416; Wed, 20 Nov 2019 22:08:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574316500; cv=none; d=google.com; s=arc-20160816; b=JDzeS1XFdO9bbm6VpkaGqQPkMoAa3qiD788cdjli4OixOpZ6FKpYmopUDJr7BKq0AC nh78BZWMRf3rtvYkHcLFnuzQFUR2jSBZudVqzD1WppV2FIJgC9vCxu5pKF2FuXeH42Lo eJtODWa9fBt/Ih+k+cJZ3SHTM5k2tNDAj/WPuYO6xb43TVa6ebE/J7YJyfoAuea4IUT+ DuK+QFPl6o8vc5XXehVWFW3y+/4T0N+EMiPZWnWctAVjZ3fIHBEQGYHVONiqUlfvvVEx 7B76lepikjEN+LYja4jJcaLjvl3n8iFb/CDHt5ee/wLOeYGHZz5HT8raZeIGi1iaH0OL YY+A== 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=Aftv2B7pRGkc7+AovR1Vv564LUJRIu9W5RpFUDJ8xIw=; b=Dwo9EuBTuCCpFHbVPqetkcUyIJZBUWAAwA/8APd06fbFb1S9fUWOlb+0aB51CRKRgY 0Mk8QvuvTz4uh7AMdFeJuEV2t63lq8FkRZcHSC9PS4HR1dztAT+v59z9KYf9Z1+w1INR iT0xAUqWUWi81fasi1GzLkuOZESS2AeFW6G1zX+PToMiNY9BGDD+h1vq7KjlaZxWMx1a DqsJCjqI/CZvfSS11rtPzdaYIAlgNKzB6DQkYEcHtEDKo+KgHSH12E/B6ChwyixqMN// EgLPt77WrLsLKAhxhQjaXWOYc5IsrkHH1krWmCCJHsbtT3nwJGm4lqEDxgCPj5nXjWGh xMmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=nLLinjq9; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n8si971026eja.438.2019.11.20.22.07.55; Wed, 20 Nov 2019 22:08:20 -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=@gmail.com header.s=20161025 header.b=nLLinjq9; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726705AbfKUGEv (ORCPT + 99 others); Thu, 21 Nov 2019 01:04:51 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:44322 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726014AbfKUGEu (ORCPT ); Thu, 21 Nov 2019 01:04:50 -0500 Received: by mail-wr1-f65.google.com with SMTP id i12so2795748wrn.11 for ; Wed, 20 Nov 2019 22:04:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Aftv2B7pRGkc7+AovR1Vv564LUJRIu9W5RpFUDJ8xIw=; b=nLLinjq9fpIl0ZgbkNtjiASwUpwqguNl6ZcBlyo/8h3DND16GCBrkFNrJW3S+oOYms dAdKllSaQ3iGsbrtWoqh1p5eHGq1vVPUkoGpx4jbXXczHFTzN0bEDvBYp+njO7KgOYKt HqmRGsaGobDhd3Q6qaxIAnGl5DOz7r/CJckiNikZ5f2aOzB5FnpTPCLe2C0SXFrUbd7A 9iuTdkAzOVJial0lxrLFJssx97oCIz4AUrdekKYxWfTIIvbPPvsnIt4W9n+GguQXTxb9 9eRcBSmzomQapHcswda8JAQO73rtyX+zRhm1ERZQFTbwFeKK/QimEu3IyPdpuKArDN+i A9cA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=Aftv2B7pRGkc7+AovR1Vv564LUJRIu9W5RpFUDJ8xIw=; b=ZOS43xGlQxqLDDLFeqYy/hYCrFDtE3NERnD04fNSCDmVw33ZkBzLwRgVO/juinw0Fa zq0Z8E1bK3nnpTMParTHm+t8/hshVjOOQ/U3Afg80okV+4U9GLgyTu27TjnM2WbZFwAf SdJih5+MbYS86CKC/okPqE0QIaVADJX8x9USEwmBoLdqWzOyA8sEIiL6a5OwmK0aTNT1 Ypyj1y2nYk0uGS8I/0/ryiE83FzElO1nptzEKSrLgOz+TFo9Qg3PQ4WMypo2jK286tsd g4kQX/ntNVwCBsQkcXf5WOPFZRC1Y2+Eo161p+5DK/rMKeLHBXQlgl7wxnnE5oPJ1HH3 0FoA== X-Gm-Message-State: APjAAAVZEuzeb5QG1rBthBpMrHX4EGAUUK3QM2pBEDTY7kE/zOfDpyZ+ kvPDeYzstDp0CpGzcEAbIk8= X-Received: by 2002:adf:de0a:: with SMTP id b10mr8395798wrm.268.1574316286735; Wed, 20 Nov 2019 22:04:46 -0800 (PST) Received: from gmail.com (54033286.catv.pool.telekom.hu. [84.3.50.134]) by smtp.gmail.com with ESMTPSA id v81sm1820545wmg.4.2019.11.20.22.04.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Nov 2019 22:04:46 -0800 (PST) Date: Thu, 21 Nov 2019 07:04:44 +0100 From: Ingo Molnar To: Fenghua Yu Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , H Peter Anvin , Peter Zijlstra , 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: <20191121060444.GA55272@gmail.com> References: <1574297603-198156-1-git-send-email-fenghua.yu@intel.com> <1574297603-198156-7-git-send-email-fenghua.yu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1574297603-198156-7-git-send-email-fenghua.yu@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 * Fenghua Yu wrote: > Split lock detection is disabled by default. Enable the feature by > kernel parameter "split_lock_detect". > > Usually it is enabled in real time when expensive split lock issues > cannot be tolerated so should be fatal errors, or for debugging and > fixing the split lock issues to improve performance. > > Please note: enabling this feature will cause kernel panic or SIGBUS > to user application when a split lock issue is detected. > > Signed-off-by: Fenghua Yu > Reviewed-by: Tony Luck > --- > .../admin-guide/kernel-parameters.txt | 10 ++++++ > arch/x86/kernel/cpu/intel.c | 34 +++++++++++++++++++ > 2 files changed, 44 insertions(+) > > diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt > index 8dee8f68fe15..1ed313891f44 100644 > --- a/Documentation/admin-guide/kernel-parameters.txt > +++ b/Documentation/admin-guide/kernel-parameters.txt > @@ -3166,6 +3166,16 @@ > > nosoftlockup [KNL] Disable the soft-lockup detector. > > + split_lock_detect > + [X86] Enable split lock detection > + This is a real time or debugging feature. When enabled > + (and if hardware support is present), atomic > + instructions that access data across cache line > + boundaries will result in an alignment check exception. > + When triggered in applications the kernel will send > + SIGBUS. The kernel will panic for a split lock in > + OS code. It would be really nice to be able to enable/disable this runtime as well, has this been raised before, and what was the conclusion? Thanks, Ingo