From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D5A7AC43217 for ; Thu, 13 Oct 2022 17:42:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229717AbiJMRm2 (ORCPT ); Thu, 13 Oct 2022 13:42:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229529AbiJMRm1 (ORCPT ); Thu, 13 Oct 2022 13:42:27 -0400 Received: from mail.skyhub.de (mail.skyhub.de [5.9.137.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AE6BEE09F6; Thu, 13 Oct 2022 10:42:26 -0700 (PDT) Received: from zn.tnic (p200300ea9733e733329c23fffea6a903.dip0.t-ipconnect.de [IPv6:2003:ea:9733:e733:329c:23ff:fea6:a903]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id EC5211EC05DD; Thu, 13 Oct 2022 19:42:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1665682941; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=8xuLhSs8dsjfQL2DoJpmLFVCxVAcAP14v8iSD+oUuBQ=; b=ZSHQJzyhXhcM4IDgdrqZZtst/sUodv3kkGVmHDukY1HQRyrbBWlLdrCUC44rGGzLVaGLxM J4yzTRS60rGBmDgTm/bEPn8YDuA8WOzqAY+fsYJq6mFFbcHY3I2hzQa7NocCtB5Wyx55/b FWwtWhGyZjstDOu2c1rBO4ozVuj0l/M= Date: Thu, 13 Oct 2022 19:42:16 +0200 From: Borislav Petkov To: Peter Zijlstra , Huang Ying Cc: Ard Biesheuvel , Justin He , Len Brown , James Morse , Tony Luck , Mauro Carvalho Chehab , Robert Richter , Robert Moore , Qiuxu Zhuo , Yazen Ghannam , Jan Luebbe , Khuong Dinh , Kani Toshi , "linux-acpi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-edac@vger.kernel.org" , "devel@acpica.org" , "Rafael J . Wysocki" , Shuai Xue , Jarkko Sakkinen , "linux-efi@vger.kernel.org" , nd , kernel test robot Subject: Re: [PATCH v8 6/7] apei/ghes: Use unrcu_pointer for cmpxchg Message-ID: References: <20221010023559.69655-1-justin.he@arm.com> <20221010023559.69655-7-justin.he@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org On Thu, Oct 13, 2022 at 06:45:44PM +0200, Peter Zijlstra wrote: > Borislav is thinking too much x86. Failed cmpxchg() does indeed not > imply any memory ordering for all architectures -- and while the memory > clobber (aka. barrier()) is equivalent to an smp_wmb() on x86, that most > certainly doesn't hold for non x86 code. Right, but the patch was addied by an Intel person, CCed: 152cef40a808 ("ACPI, APEI, GHES, Error records content based throttle")a So I don't think he was thinking about ARM when doing that. And that commit message doesn't say one whit why that memory barrier is needed there. Reading that comment, it sounds like he wanted a hw memory barrier - MFENCE - but I don't see how normal data dependency wouldn't enforce the proper order already... So that barrier looks out of place there. Btw, this is the next perfect example why I'm asking people to write proper commit messages so that when we do git archeology later, we can figure out why something was done the way it has been. And in this case, we can't. ;-\ Because writing proper commit messages is for losers. Yeah, right. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette