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 X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EBF9BC4361B for ; Fri, 11 Dec 2020 22:00:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B329423C84 for ; Fri, 11 Dec 2020 22:00:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2395196AbgLKVLo (ORCPT ); Fri, 11 Dec 2020 16:11:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50142 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2395159AbgLKVLT (ORCPT ); Fri, 11 Dec 2020 16:11:19 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EDF0DC0613D3; Fri, 11 Dec 2020 13:10:38 -0800 (PST) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1607721037; 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: in-reply-to:in-reply-to:references:references; bh=Mo2pAYuz+fdW3SgRq/XPKjojssrrAkt+Ucf5porPagA=; b=Jwq6ijv1GHVoieraIz9ydp2q4O6t/9GUc1eMMejV0w+8HMZFh2MudG98dd8dHkmBbtcY23 rWBcv8bjhS74ccS+ED0Y2Ffx6+AE3ILOJic4uDyRWA5WOr4daMkBthSaLo/d+kCRNbQOx4 /u1tQekXWSXK+tnBOy8SnybwPlOHVa58yu83Wz/vzB6Q7kN2A+/PUNns70l+Y5AN2H5xGf 7iGU6k2Q0hE5HprbYz1Eu3KcHibChvhCzqBaZRj/WCHuBdSDA1VHcJDgDidwq1qqERl/TB s9Q8j4pTrdZ9IKgusBRQ2bAa+V0Lruumrto07aTzrOd30AjJDgps945/dnu+DQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1607721037; 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: in-reply-to:in-reply-to:references:references; bh=Mo2pAYuz+fdW3SgRq/XPKjojssrrAkt+Ucf5porPagA=; b=6/ko850V23KEuDS4nOrh7BVWq2Ew0gOANx75sF2cdzYDioAkFAZKWg5jsxMNTHTfHBIf/A ckLpFAtkm+PHw5Bw== To: David Laight , Tvrtko Ursulin , LKML Cc: Peter Zijlstra , Marc Zyngier , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , "intel-gfx\@lists.freedesktop.org" , "dri-devel\@lists.freedesktop.org" , "James E.J. Bottomley" , Helge Deller , afzal mohammed , "linux-parisc\@vger.kernel.org" , Russell King , "linux-arm-kernel\@lists.infradead.org" , Mark Rutland , Catalin Marinas , Will Deacon , Christian Borntraeger , Heiko Carstens , "linux-s390\@vger.kernel.org" , Pankaj Bharadiya , Chris Wilson , Wambui Karuga , Linus Walleij , "linux-gpio\@vger.kernel.org" , Lee Jones , Jon Mason , Dave Jiang , Allen Hubbe , "linux-ntb\@googlegroups.com" , Lorenzo Pieralisi , Rob Herring , Bjorn Helgaas , Michal Simek , "linux-pci\@vger.kernel.org" , Karthikeyan Mitran , Hou Zhiqiang , Tariq Toukan , "David S. Miller" , Jakub Kicinski , "netdev\@vger.kernel.org" , "linux-rdma\@vger.kernel.org" , Saeed Mahameed , Leon Romanovsky , Boris Ostrovsky , Juergen Gross , Stefano Stabellini , "xen-devel\@lists.xenproject.org" Subject: RE: [patch 14/30] drm/i915/pmu: Replace open coded kstat_irqs() copy In-Reply-To: References: <20201210192536.118432146@linutronix.de> <20201210194043.957046529@linutronix.de> <87y2i4h54i.fsf@nanos.tec.linutronix.de> Date: Fri, 11 Dec 2020 22:10:36 +0100 Message-ID: <87eejwgib7.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org On Fri, Dec 11 2020 at 14:19, David Laight wrote: > From: Thomas Gleixner >> You can't catch that. If this really becomes an issue you need a >> sequence counter around it. > > Or just two copies of the high word. > Provided the accesses are sequenced: > writer: > load high:low > add small_value,high:low > store high > store low > store high_copy > reader: > load high_copy > load low > load high > if (high != high_copy) > low = 0; And low = 0 is solving what? You need to loop back and retry until it's consistent and then it's nothing else than an open coded sequence count. Thanks, tglx From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from galois.linutronix.de (Galois.linutronix.de. [193.142.43.55]) by gmr-mx.google.com with ESMTPS id j15si311162lfk.12.2020.12.11.13.10.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Dec 2020 13:10:38 -0800 (PST) From: Thomas Gleixner Subject: RE: [patch 14/30] drm/i915/pmu: Replace open coded kstat_irqs() copy In-Reply-To: References: <20201210192536.118432146@linutronix.de> <20201210194043.957046529@linutronix.de> <87y2i4h54i.fsf@nanos.tec.linutronix.de> Date: Fri, 11 Dec 2020 22:10:36 +0100 Message-ID: <87eejwgib7.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain To: David Laight , Tvrtko Ursulin , LKML Cc: Peter Zijlstra , Marc Zyngier , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , "intel-gfx@lists.freedesktop.org" , "dri-devel@lists.freedesktop.org" , "James E.J. Bottomley" , Helge Deller , afzal mohammed , "linux-parisc@vger.kernel.org" , Russell King , "linux-arm-kernel@lists.infradead.org" , Mark Rutland , Catalin Marinas , Will Deacon , Christian Borntraeger , Heiko Carstens , "linux-s390@vger.kernel.org" , Pankaj Bharadiya , Chris Wilson , Wambui Karuga , Linus Walleij , "linux-gpio@vger.kernel.org" , Lee Jones , Jon Mason , Dave Jiang , Allen Hubbe , "linux-ntb@googlegroups.com" , Lorenzo Pieralisi , Rob Herring , Bjorn Helgaas , Michal Simek , "linux-pci@vger.kernel.org" , Karthikeyan Mitran , Hou Zhiqiang , Tariq Toukan , "David S. Miller" , Jakub Kicinski , "netdev@vger.kernel.org" , "linux-rdma@vger.kernel.org" , Saeed Mahameed , Leon Romanovsky , Boris Ostrovsky , Juergen Gross , Stefano Stabellini , "xen-devel@lists.xenproject.org" List-ID: On Fri, Dec 11 2020 at 14:19, David Laight wrote: > From: Thomas Gleixner >> You can't catch that. If this really becomes an issue you need a >> sequence counter around it. > > Or just two copies of the high word. > Provided the accesses are sequenced: > writer: > load high:low > add small_value,high:low > store high > store low > store high_copy > reader: > load high_copy > load low > load high > if (high != high_copy) > low = 0; And low = 0 is solving what? You need to loop back and retry until it's consistent and then it's nothing else than an open coded sequence count. Thanks, tglx 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 X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0E0C8C1B0D8 for ; Mon, 14 Dec 2020 08:18:04 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B5D1C207A5 for ; Mon, 14 Dec 2020 08:18:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B5D1C207A5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linutronix.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 067266E084; Mon, 14 Dec 2020 08:17:42 +0000 (UTC) Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by gabe.freedesktop.org (Postfix) with ESMTPS id CF4EC6EC9E; Fri, 11 Dec 2020 21:10:38 +0000 (UTC) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1607721037; 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: in-reply-to:in-reply-to:references:references; bh=Mo2pAYuz+fdW3SgRq/XPKjojssrrAkt+Ucf5porPagA=; b=Jwq6ijv1GHVoieraIz9ydp2q4O6t/9GUc1eMMejV0w+8HMZFh2MudG98dd8dHkmBbtcY23 rWBcv8bjhS74ccS+ED0Y2Ffx6+AE3ILOJic4uDyRWA5WOr4daMkBthSaLo/d+kCRNbQOx4 /u1tQekXWSXK+tnBOy8SnybwPlOHVa58yu83Wz/vzB6Q7kN2A+/PUNns70l+Y5AN2H5xGf 7iGU6k2Q0hE5HprbYz1Eu3KcHibChvhCzqBaZRj/WCHuBdSDA1VHcJDgDidwq1qqERl/TB s9Q8j4pTrdZ9IKgusBRQ2bAa+V0Lruumrto07aTzrOd30AjJDgps945/dnu+DQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1607721037; 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: in-reply-to:in-reply-to:references:references; bh=Mo2pAYuz+fdW3SgRq/XPKjojssrrAkt+Ucf5porPagA=; b=6/ko850V23KEuDS4nOrh7BVWq2Ew0gOANx75sF2cdzYDioAkFAZKWg5jsxMNTHTfHBIf/A ckLpFAtkm+PHw5Bw== To: David Laight , Tvrtko Ursulin , LKML Subject: RE: [patch 14/30] drm/i915/pmu: Replace open coded kstat_irqs() copy In-Reply-To: References: <20201210192536.118432146@linutronix.de> <20201210194043.957046529@linutronix.de> <87y2i4h54i.fsf@nanos.tec.linutronix.de> Date: Fri, 11 Dec 2020 22:10:36 +0100 Message-ID: <87eejwgib7.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 X-Mailman-Approved-At: Mon, 14 Dec 2020 08:17:40 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Karthikeyan Mitran , Peter Zijlstra , Catalin Marinas , "dri-devel@lists.freedesktop.org" , Chris Wilson , "James E.J. Bottomley" , "netdev@vger.kernel.org" , Will Deacon , Michal Simek , "linux-s390@vger.kernel.org" , afzal mohammed , Lorenzo Pieralisi , Dave Jiang , "xen-devel@lists.xenproject.org" , Leon Romanovsky , "linux-rdma@vger.kernel.org" , Marc Zyngier , Helge Deller , Russell King , Christian Borntraeger , "linux-pci@vger.kernel.org" , Jakub Kicinski , Heiko Carstens , Wambui Karuga , Allen Hubbe , Juergen Gross , "intel-gfx@lists.freedesktop.org" , "linux-gpio@vger.kernel.org" , Stefano Stabellini , Rodrigo Vivi , Bjorn Helgaas , Lee Jones , "linux-arm-kernel@lists.infradead.org" , Boris Ostrovsky , David Airlie , "linux-parisc@vger.kernel.org" , Pankaj Bharadiya , Hou Zhiqiang , Tariq Toukan , Jon Mason , "linux-ntb@googlegroups.com" , Saeed Mahameed , "David S. Miller" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Fri, Dec 11 2020 at 14:19, David Laight wrote: > From: Thomas Gleixner >> You can't catch that. If this really becomes an issue you need a >> sequence counter around it. > > Or just two copies of the high word. > Provided the accesses are sequenced: > writer: > load high:low > add small_value,high:low > store high > store low > store high_copy > reader: > load high_copy > load low > load high > if (high != high_copy) > low = 0; And low = 0 is solving what? You need to loop back and retry until it's consistent and then it's nothing else than an open coded sequence count. Thanks, tglx _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel 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 X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 455EBC4361B for ; Fri, 11 Dec 2020 21:10:41 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BE27B2405A for ; Fri, 11 Dec 2020 21:10:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BE27B2405A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linutronix.de Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B73FA6EC9E; Fri, 11 Dec 2020 21:10:39 +0000 (UTC) Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by gabe.freedesktop.org (Postfix) with ESMTPS id CF4EC6EC9E; Fri, 11 Dec 2020 21:10:38 +0000 (UTC) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1607721037; 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: in-reply-to:in-reply-to:references:references; bh=Mo2pAYuz+fdW3SgRq/XPKjojssrrAkt+Ucf5porPagA=; b=Jwq6ijv1GHVoieraIz9ydp2q4O6t/9GUc1eMMejV0w+8HMZFh2MudG98dd8dHkmBbtcY23 rWBcv8bjhS74ccS+ED0Y2Ffx6+AE3ILOJic4uDyRWA5WOr4daMkBthSaLo/d+kCRNbQOx4 /u1tQekXWSXK+tnBOy8SnybwPlOHVa58yu83Wz/vzB6Q7kN2A+/PUNns70l+Y5AN2H5xGf 7iGU6k2Q0hE5HprbYz1Eu3KcHibChvhCzqBaZRj/WCHuBdSDA1VHcJDgDidwq1qqERl/TB s9Q8j4pTrdZ9IKgusBRQ2bAa+V0Lruumrto07aTzrOd30AjJDgps945/dnu+DQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1607721037; 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: in-reply-to:in-reply-to:references:references; bh=Mo2pAYuz+fdW3SgRq/XPKjojssrrAkt+Ucf5porPagA=; b=6/ko850V23KEuDS4nOrh7BVWq2Ew0gOANx75sF2cdzYDioAkFAZKWg5jsxMNTHTfHBIf/A ckLpFAtkm+PHw5Bw== To: David Laight , Tvrtko Ursulin , LKML In-Reply-To: References: <20201210192536.118432146@linutronix.de> <20201210194043.957046529@linutronix.de> <87y2i4h54i.fsf@nanos.tec.linutronix.de> Date: Fri, 11 Dec 2020 22:10:36 +0100 Message-ID: <87eejwgib7.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Subject: Re: [Intel-gfx] [patch 14/30] drm/i915/pmu: Replace open coded kstat_irqs() copy X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Karthikeyan Mitran , Peter Zijlstra , Catalin Marinas , Linus Walleij , "dri-devel@lists.freedesktop.org" , Chris Wilson , "James E.J. Bottomley" , "netdev@vger.kernel.org" , Will Deacon , Michal Simek , "linux-s390@vger.kernel.org" , afzal mohammed , Lorenzo Pieralisi , Dave Jiang , "xen-devel@lists.xenproject.org" , Leon Romanovsky , "linux-rdma@vger.kernel.org" , Marc Zyngier , Helge Deller , Russell King , Christian Borntraeger , "linux-pci@vger.kernel.org" , Jakub Kicinski , Heiko Carstens , Wambui Karuga , Allen Hubbe , Juergen Gross , Rob Herring , "intel-gfx@lists.freedesktop.org" , "linux-gpio@vger.kernel.org" , Stefano Stabellini , Bjorn Helgaas , Lee Jones , "linux-arm-kernel@lists.infradead.org" , Boris Ostrovsky , David Airlie , "linux-parisc@vger.kernel.org" , Hou Zhiqiang , Tariq Toukan , Jon Mason , "linux-ntb@googlegroups.com" , Saeed Mahameed , "David S. Miller" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Fri, Dec 11 2020 at 14:19, David Laight wrote: > From: Thomas Gleixner >> You can't catch that. If this really becomes an issue you need a >> sequence counter around it. > > Or just two copies of the high word. > Provided the accesses are sequenced: > writer: > load high:low > add small_value,high:low > store high > store low > store high_copy > reader: > load high_copy > load low > load high > if (high != high_copy) > low = 0; And low = 0 is solving what? You need to loop back and retry until it's consistent and then it's nothing else than an open coded sequence count. Thanks, tglx _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx 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 X-Spam-Level: X-Spam-Status: No, score=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A3818C4361B for ; Fri, 11 Dec 2020 21:10:49 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 45C752405A for ; Fri, 11 Dec 2020 21:10:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 45C752405A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linutronix.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.50900.89734 (Exim 4.92) (envelope-from ) id 1knpgW-0001LQ-Tn; Fri, 11 Dec 2020 21:10:40 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 50900.89734; Fri, 11 Dec 2020 21:10:40 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1knpgW-0001LJ-Qk; Fri, 11 Dec 2020 21:10:40 +0000 Received: by outflank-mailman (input) for mailman id 50900; Fri, 11 Dec 2020 21:10:39 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1knpgV-0001LD-4j for xen-devel@lists.xenproject.org; Fri, 11 Dec 2020 21:10:39 +0000 Received: from galois.linutronix.de (unknown [193.142.43.55]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 335dd8a5-c5d8-4720-bfbd-08f1e6b6cb1b; Fri, 11 Dec 2020 21:10:38 +0000 (UTC) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 335dd8a5-c5d8-4720-bfbd-08f1e6b6cb1b From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1607721037; 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: in-reply-to:in-reply-to:references:references; bh=Mo2pAYuz+fdW3SgRq/XPKjojssrrAkt+Ucf5porPagA=; b=Jwq6ijv1GHVoieraIz9ydp2q4O6t/9GUc1eMMejV0w+8HMZFh2MudG98dd8dHkmBbtcY23 rWBcv8bjhS74ccS+ED0Y2Ffx6+AE3ILOJic4uDyRWA5WOr4daMkBthSaLo/d+kCRNbQOx4 /u1tQekXWSXK+tnBOy8SnybwPlOHVa58yu83Wz/vzB6Q7kN2A+/PUNns70l+Y5AN2H5xGf 7iGU6k2Q0hE5HprbYz1Eu3KcHibChvhCzqBaZRj/WCHuBdSDA1VHcJDgDidwq1qqERl/TB s9Q8j4pTrdZ9IKgusBRQ2bAa+V0Lruumrto07aTzrOd30AjJDgps945/dnu+DQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1607721037; 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: in-reply-to:in-reply-to:references:references; bh=Mo2pAYuz+fdW3SgRq/XPKjojssrrAkt+Ucf5porPagA=; b=6/ko850V23KEuDS4nOrh7BVWq2Ew0gOANx75sF2cdzYDioAkFAZKWg5jsxMNTHTfHBIf/A ckLpFAtkm+PHw5Bw== To: David Laight , Tvrtko Ursulin , LKML Cc: Peter Zijlstra , Marc Zyngier , Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Daniel Vetter , "intel-gfx\@lists.freedesktop.org" , "dri-devel\@lists.freedesktop.org" , "James E.J. Bottomley" , Helge Deller , afzal mohammed , "linux-parisc\@vger.kernel.org" , Russell King , "linux-arm-kernel\@lists.infradead.org" , Mark Rutland , Catalin Marinas , Will Deacon , Christian Borntraeger , Heiko Carstens , "linux-s390\@vger.kernel.org" , Pankaj Bharadiya , Chris Wilson , Wambui Karuga , Linus Walleij , "linux-gpio\@vger.kernel.org" , Lee Jones , Jon Mason , Dave Jiang , Allen Hubbe , "linux-ntb\@googlegroups.com" , Lorenzo Pieralisi , Rob Herring , Bjorn Helgaas , Michal Simek , "linux-pci\@vger.kernel.org" , Karthikeyan Mitran , Hou Zhiqiang , Tariq Toukan , "David S. Miller" , Jakub Kicinski , "netdev\@vger.kernel.org" , "linux-rdma\@vger.kernel.org" , Saeed Mahameed , Leon Romanovsky , Boris Ostrovsky , Juergen Gross , Stefano Stabellini , "xen-devel\@lists.xenproject.org" Subject: RE: [patch 14/30] drm/i915/pmu: Replace open coded kstat_irqs() copy In-Reply-To: References: <20201210192536.118432146@linutronix.de> <20201210194043.957046529@linutronix.de> <87y2i4h54i.fsf@nanos.tec.linutronix.de> Date: Fri, 11 Dec 2020 22:10:36 +0100 Message-ID: <87eejwgib7.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain On Fri, Dec 11 2020 at 14:19, David Laight wrote: > From: Thomas Gleixner >> You can't catch that. If this really becomes an issue you need a >> sequence counter around it. > > Or just two copies of the high word. > Provided the accesses are sequenced: > writer: > load high:low > add small_value,high:low > store high > store low > store high_copy > reader: > load high_copy > load low > load high > if (high != high_copy) > low = 0; And low = 0 is solving what? You need to loop back and retry until it's consistent and then it's nothing else than an open coded sequence count. Thanks, tglx