Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp997160imu; Fri, 11 Jan 2019 12:59:40 -0800 (PST) X-Google-Smtp-Source: ALg8bN7XBPh/Ux07eJd6Fe9kf8M0T+j4tq7lDdIcGMCVYPfqPauxqYi/UplBJUvTnQOuL8KccZrO X-Received: by 2002:a63:f1f:: with SMTP id e31mr12459433pgl.274.1547240380449; Fri, 11 Jan 2019 12:59:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547240380; cv=none; d=google.com; s=arc-20160816; b=mOejeUXq2msrQloxWcHNAOpc7jcAeCSXJ9Tx/foqCp+2YqW8MWt6sCbRHbfEAkJfk7 vJTbUAEPoErXkpjdeWQ74BDZns6RlugAt14K7eQzuMfptlpXR/FRNefQ/ygANFUqgWv+ DhaBZkGLnnfX/7Od3UZAB0Ixp5jrHVZhgC5JU13AfOvencXdw2WCbUaoQBnCzE/zfDyk lusNnIIJZgwpddDneUkfArLbJqwvgtFRcSPjqAPVBE9VJ73YmxqoSLA6jwtJaLOf3MiA yfCiKBFB1S4RY9044HDRzJUijcVwDTd+bgyf0cALDy7q+dGyGKJRmA+ERm9JXf0nU9fH w3iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=vcoN/6AL8T1bl0YDBTE/fAaBD2U7ixFP5WrG/c4JL9I=; b=joQ4Op3t1YCViz37aaPQaK9Edfhs52puBEePnozIDt5Na2BdQPx1lbEiH8C4HqRtbP Hwuev5GegcX5tD3WWL07JpRZYckNtW2b9Fr90gpWHENzFByRNbo25kV0PLs4kt69biQT m9yCYpgQzUIj+qTVd8u1Ba3QFQEO6aaJPpCLdjSg2rpkwxQiRABFPM89rOF3Ybm3L/pT rJUhYAusiYN9QHOZXibZNnBAAkpyRLo/l8+lFiUf1ur0fymyz4JEahZNl1EQUHoGYkAf bHxIOwsH5g1uMz/4RE/2krX3e223Y+DGIzLLi2oftM1tPTse1zJH+772Kj6KZ9KL+Kue 2HHg== ARC-Authentication-Results: i=1; mx.google.com; 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 e4si17894190pgd.256.2019.01.11.12.59.25; Fri, 11 Jan 2019 12:59:40 -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; 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 S2389828AbfAKSdC (ORCPT + 99 others); Fri, 11 Jan 2019 13:33:02 -0500 Received: from foss.arm.com ([217.140.101.70]:33454 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733084AbfAKSdB (ORCPT ); Fri, 11 Jan 2019 13:33:01 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 1005480D; Fri, 11 Jan 2019 10:33:01 -0800 (PST) Received: from [10.1.196.105] (eglon.cambridge.arm.com [10.1.196.105]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 20EAA3F6CF; Fri, 11 Jan 2019 10:32:59 -0800 (PST) Subject: Re: Question about qspinlock nest To: Peter Zijlstra Cc: Waiman Long , Zhenzhong Duan , LKML , SRINIVAS References: <910e9fb6-d0df-4711-fe2b-244b3c20eb82@redhat.com> <20190110201217.GH2861@worktop.programming.kicks-ass.net> From: James Morse Message-ID: Date: Fri, 11 Jan 2019 18:32:58 +0000 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 MIME-Version: 1.0 In-Reply-To: <20190110201217.GH2861@worktop.programming.kicks-ass.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Peter, On 10/01/2019 20:12, Peter Zijlstra wrote: > On Thu, Jan 10, 2019 at 06:25:57PM +0000, James Morse wrote: > >> On arm64 if all the RAS and psuedo-NMI patches land, our worst-case interleaving >> jumps to at least 7. The culprit is APEI using spinlocks to protect fixmap slots. >> >> I have an RFC to bump the number of node bits from 2 to 3, but as this is APEI >> four times, it may be preferable to make it use something other than spinlocks. >> The worst-case order is below. Each one masks those before it: >> 1. process context >> 2. soft-irq >> 3. hard-irq >> 4. psuedo-nmi [0] >> - using the irqchip priorities to configure some IRQs as NMI. >> 5. SError [1] >> - a bit like an asynchronous MCE. ACPI allows this to convey CPER records, >> requiring an APEI call. >> 6&7. SDEI [2] >> - a firmware triggered software interrupt, only its two of them, either of >> which could convey CPER records. >> 8. Synchronous external abort >> - again, similar to MCE. There are systems using this with APEI. > The thing is, everything non-maskable (NMI like) really should not be > using spinlocks at all. > > I otherwise have no clue about wth APEI is, but it sounds like horrible > crap ;-) I think you've called it that before!: its that GHES thing in drivers/acpi/apei. What is the alternative? bit_spin_lock()? These things can happen independently on multiple CPUs. On arm64 these NMIlike things don't affect all CPUs like they seem to on x86. Thanks, James