Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp564471imm; Fri, 22 Jun 2018 01:13:36 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIGfzuv64yh5bgQZb5NoHzNn1Zh7ItTSTOcsdgrWIeTnbtxqAFy1sL7mChU+jB5fyrya++f X-Received: by 2002:a63:82c7:: with SMTP id w190-v6mr524123pgd.172.1529655216675; Fri, 22 Jun 2018 01:13:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529655216; cv=none; d=google.com; s=arc-20160816; b=XJeHWjoYiUO6yT/nLeWTeg8j83Ij3FQ7CTgRy9YG9A7Dci95nmwOZuGp3L18z2LNtS H5Qlj7UFsTXyjz2yM62uSE+ICnVYFFZ/LlF+Sq7fmpFkiCLjGJpGSmRB6cLW4mN5MdIc JDeRxLIm9+yNnnRZPstjlklzUEmzF6al7+YDrJ6n6MhBtrr1zR3eVNllg698yOAC5zZC hO+wV5xb7YraaK5qILf22wuWSysN3aufFOyDL7zDOsfGmNfUdFLrs3Ohyzy9k7K8us/9 GDrmbePiBaVnufk8y7EpQBYaHe/c6oPsvOPyFqSzs7239MvWZlj5JdaiftXxOIumIlaR KYGQ== 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:arc-authentication-results; bh=51DIVPjuAJ+iNSAkcrS8UwWpiAFFC1duZrFh6dYE3zk=; b=c/elFy+eeQxl2tqVoANZOw1v3AYs5Ilaa0PJzNkXDm+sV/altEEJVSRP6S2ZZlhbcd 43mu8hqMaQ7/PlfrUE5PBZQIU5MueHVR5rbIB7Rw901Nkt2o+yHJpm/VWrvvAcIePjII sALXeLx/dKL6o6Kqb5QNbLGWxbGZzU7ZfuUzUn3saRhO9ii+a977NyKRP5ln8aH0Qqi4 UP954ls++P77YuR09lyWetz1M2HckgYgAg9z4Rq8GVr0ijV4ZmC9FekMd86r0rGjsw6P BF5u1W02Qjgy5uFNt9K1E38usSkFAv0pUk46jw3eRKT3Rt3vQ5XMognRIXWPdiGuiumy c3kQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=oZHqfsN6; 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 b3-v6si5764455pgr.495.2018.06.22.01.13.22; Fri, 22 Jun 2018 01:13:36 -0700 (PDT) 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=oZHqfsN6; 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 S933200AbeFVIMH (ORCPT + 99 others); Fri, 22 Jun 2018 04:12:07 -0400 Received: from merlin.infradead.org ([205.233.59.134]:41236 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751527AbeFVIMC (ORCPT ); Fri, 22 Jun 2018 04:12:02 -0400 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=51DIVPjuAJ+iNSAkcrS8UwWpiAFFC1duZrFh6dYE3zk=; b=oZHqfsN6GY1/RxP1flfmNJvT4 mDjq+IZLPqXmODHnzHFGWzblPUNh6le3Kmq0DO4uLuVnAkOnV1Jj28V3/aaRHi/B6zQqxu2/xSoxo HIRTGqU/K3m6CfRmuJrJ7upRMebg1dIoacYl7lV5MdbvBdwIdis3zqeC79TV276o3pbUSuCP36Jnh ABh0hQmdUMKK0jVFTbGbgu5Di5saTsMMVbI65S6vuSiLEAvzXr0utPmviz85Na3sOsyt4s0k+sD7B /kRf3vXH811j2r9SwnwdxNhsU1PDSoHZam18S1f693PwufYKI9/w/zxzdBFfXKPlsrSPOMTD/zWSn GRKQl7ffw==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fWHAa-0005qk-M1; Fri, 22 Jun 2018 08:11:48 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 283E32029F1D5; Fri, 22 Jun 2018 10:11:46 +0200 (CEST) Date: Fri, 22 Jun 2018 10:11:46 +0200 From: Peter Zijlstra To: Fenghua Yu Cc: Dave Hansen , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Ashok Raj , Rafael Wysocki , Tony Luck , Alan Cox , Ravi V Shankar , Arjan van de Ven , linux-kernel , x86 Subject: Re: [RFC PATCH 00/16] x86/split_lock: Enable #AC exception for split locked accesses Message-ID: <20180622081146.GG2494@hirez.programming.kicks-ass.net> References: <1527435965-202085-1-git-send-email-fenghua.yu@intel.com> <20180621193738.GA13636@worktop.programming.kicks-ass.net> <20180621201851.GC114883@romley-ivt3.sc.intel.com> <20180621220003.GD114883@romley-ivt3.sc.intel.com> <20180621220844.GB2494@hirez.programming.kicks-ass.net> <6fbff2df-96c9-db51-371b-a23d1a84d070@intel.com> <20180621224203.GA18979@romley-ivt3.sc.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180621224203.GA18979@romley-ivt3.sc.intel.com> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 21, 2018 at 03:42:03PM -0700, Fenghua Yu wrote: > On Thu, Jun 21, 2018 at 03:18:19PM -0700, Dave Hansen wrote: > > On 06/21/2018 03:08 PM, Peter Zijlstra wrote: > > > On Thu, Jun 21, 2018 at 03:00:03PM -0700, Fenghua Yu wrote: > > >> The control knob for kernel is to choose re-executing the faulting > > >> instruction (default) or kernel panic. Kernel panic may be useful in hard > > >> real time which has less tolerant to bad performance. > > > The kernel should never trigger this, ever. Any #AC is a plain bug and > > > should be fixed. So unconditional WARN+disable is suffient. > > > > It sounds like we need to start with that functionality and then if > > Fenghua wants to do more, we have add-on patches that can be evaluated > > by themselves. > > For split lock in kernel, by default, I just do warning, disable feature > in #AC handler, continue to execute the faulting instruction, and re-enable > #AC for split lock after a delay. This is the default behavior in the > current patches. > > By "WAR+disable", you mean I just do this default behavior and remove the > control knob? No, remove all that broken delay crap, remove the knob. Basically remove everything. The handler really should be: do_handle_ac_trap() { if (user_mode(regs)) { send_signal(SIGBUS); return; } WARN_ON(1); disable_ac_on_all_cpus(); } done. No broken delay code, no nothing.