[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [patch 14/30] drm/i915/pmu: Replace open coded kstat_irqs() copy
- To: David Laight <David.Laight@xxxxxxxxxx>, Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxxxxxxxx>, LKML <linux-kernel@xxxxxxxxxxxxxxx>
- From: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
- Date: Fri, 11 Dec 2020 22:10:36 +0100
- Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Marc Zyngier <maz@xxxxxxxxxx>, Jani Nikula <jani.nikula@xxxxxxxxxxxxxxx>, Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx>, Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx>, David Airlie <airlied@xxxxxxxx>, Daniel Vetter <daniel@xxxxxxxx>, "intel-gfx\@lists.freedesktop.org" <intel-gfx@xxxxxxxxxxxxxxxxxxxxx>, "dri-devel\@lists.freedesktop.org" <dri-devel@xxxxxxxxxxxxxxxxxxxxx>, "James E.J. Bottomley" <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx>, Helge Deller <deller@xxxxxx>, afzal mohammed <afzal.mohd.ma@xxxxxxxxx>, "linux-parisc\@vger.kernel.org" <linux-parisc@xxxxxxxxxxxxxxx>, Russell King <linux@xxxxxxxxxxxxxxx>, "linux-arm-kernel\@lists.infradead.org" <linux-arm-kernel@xxxxxxxxxxxxxxxxxxx>, Mark Rutland <mark.rutland@xxxxxxx>, Catalin Marinas <catalin.marinas@xxxxxxx>, Will Deacon <will@xxxxxxxxxx>, Christian Borntraeger <borntraeger@xxxxxxxxxx>, Heiko Carstens <hca@xxxxxxxxxxxxx>, "linux-s390\@vger.kernel.org" <linux-s390@xxxxxxxxxxxxxxx>, Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@xxxxxxxxx>, Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>, Wambui Karuga <wambui.karugax@xxxxxxxxx>, Linus Walleij <linus.walleij@xxxxxxxxxx>, "linux-gpio\@vger.kernel.org" <linux-gpio@xxxxxxxxxxxxxxx>, Lee Jones <lee.jones@xxxxxxxxxx>, Jon Mason <jdmason@xxxxxxxx>, Dave Jiang <dave.jiang@xxxxxxxxx>, Allen Hubbe <allenbh@xxxxxxxxx>, "linux-ntb\@googlegroups.com" <linux-ntb@xxxxxxxxxxxxxxxx>, Lorenzo Pieralisi <lorenzo.pieralisi@xxxxxxx>, Rob Herring <robh@xxxxxxxxxx>, Bjorn Helgaas <bhelgaas@xxxxxxxxxx>, Michal Simek <michal.simek@xxxxxxxxxx>, "linux-pci\@vger.kernel.org" <linux-pci@xxxxxxxxxxxxxxx>, Karthikeyan Mitran <m.karthikeyan@xxxxxxxxxxxxxx>, Hou Zhiqiang <Zhiqiang.Hou@xxxxxxx>, Tariq Toukan <tariqt@xxxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxxxxx>, Jakub Kicinski <kuba@xxxxxxxxxx>, "netdev\@vger.kernel.org" <netdev@xxxxxxxxxxxxxxx>, "linux-rdma\@vger.kernel.org" <linux-rdma@xxxxxxxxxxxxxxx>, Saeed Mahameed <saeedm@xxxxxxxxxx>, Leon Romanovsky <leon@xxxxxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, "xen-devel\@lists.xenproject.org" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Fri, 11 Dec 2020 21:10:41 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.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
|