[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <57BF4FFD.5060901@hpe.com>
Date: Thu, 25 Aug 2016 16:07:25 -0400
From: Waiman Long <waiman.long@....com>
To: Dave Hansen <dave.hansen@...el.com>
CC: Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>, <linux-kernel@...r.kernel.org>,
<x86@...nel.org>, Borislav Petkov <bp@...e.de>,
Andy Lutomirski <luto@...nel.org>,
Prarit Bhargava <prarit@...hat.com>,
Scott J Norton <scott.norton@....com>,
Douglas Hatch <doug.hatch@....com>,
Randy Wright <rwright@....com>
Subject: Re: [PATCH v6] x86/hpet: Reduce HPET counter read contention
On 08/25/2016 02:50 PM, Dave Hansen wrote:
> On 08/12/2016 05:59 PM, Waiman Long wrote:
>> + * The lock and the hpet value are stored together and can be read in a
>> + * single atomic 64-bit read. It is explicitly assumed that arch_spinlock_t
>> + * is 32 bits in size.
> This requirement forces us to give up all of the goodness of lockdep.
> Is this strictly a performance optimization or is there some function
> requirement behind it as well?
Yes, it is mostly performance optimization. Using a full spinlock will
require additional synchronization code like a memory barrier to prevent
race between the lock and HPET value with respect to the readers.
It is a simple lock that won't have additional locks nested inside. So I
wonder if there is any value in having the lockdep functionality for
this lock.
Cheers,
Longman
Powered by blists - more mailing lists