Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1461473

Re: [PATCH v5] x86/hpet: Reduce HPET counter read contention

From Dave Hansen <dave.hansen@intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH v5] x86/hpet: Reduce HPET counter read contention
Date 2016-08-12 23:50 +0200
Message-ID <s5suZ-7jU-3@gated-at.bofh.it> (permalink)
References <s5sbD-7aC-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v5] x86/hpet: Reduce HPET counter read contention Waiman Long <Waiman.Long@hpe.com> - 2016-08-12 23:30 +0200
  Re: [PATCH v5] x86/hpet: Reduce HPET counter read contention Dave Hansen <dave.hansen@intel.com> - 2016-08-12 23:40 +0200
  Re: [PATCH v5] x86/hpet: Reduce HPET counter read contention Dave Hansen <dave.hansen@intel.com> - 2016-08-12 23:50 +0200

csiph-web