[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <57AE432A.9010201@intel.com>
Date: Fri, 12 Aug 2016 14:44:10 -0700
From: Dave Hansen <dave.hansen@...el.com>
To: Waiman Long <Waiman.Long@....com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>
Cc: 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 v5] x86/hpet: Reduce HPET counter read contention
On 08/12/2016 02:25 PM, Waiman Long wrote:
> + do {
> + cpu_relax();
> + new.lockval = READ_ONCE(hpet.lockval);
> + } while ((new.value == old.value) && raw_spin_is_locked(&new.lock));
While it gets more far-fetched, this isn't guaranteed to make progress
until the saved HPET value actually changes. You could have a constant
stream of other CPUs going and doing hpet_readl() (and getting the same
value back from a sloooow HPET). So each time through this loop, this
processor sees (new.value == old.value), and sees the lock held.
Powered by blists - more mailing lists