mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Waiman Long <waiman.long@hpe.com>
To: Dave Hansen <dave.hansen@intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	<linux-kernel@vger.kernel.org>, <x86@kernel.org>,
	Borislav Petkov <bp@suse.de>, Andy Lutomirski <luto@kernel.org>,
	Prarit Bhargava <prarit@redhat.com>,
	Scott J Norton <scott.norton@hpe.com>,
	Douglas Hatch <doug.hatch@hpe.com>,
	Randy Wright <rwright@hpe.com>
Subject: Re: [PATCH v6] x86/hpet: Reduce HPET counter read contention
Date: Thu, 25 Aug 2016 16:07:25 -0400	[thread overview]
Message-ID: <57BF4FFD.5060901@hpe.com> (raw)
In-Reply-To: <57BF3DE6.1090005@intel.com>

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

      reply	other threads:[~2016-08-25 20:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-13  0:59 Waiman Long
2016-08-13  2:30 ` kbuild test robot
2016-08-16  1:52   ` Waiman Long
2016-08-25 18:50 ` Dave Hansen
2016-08-25 20:07   ` Waiman Long [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57BF4FFD.5060901@hpe.com \
    --to=waiman.long@hpe.com \
    --cc=bp@suse.de \
    --cc=dave.hansen@intel.com \
    --cc=doug.hatch@hpe.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=prarit@redhat.com \
    --cc=rwright@hpe.com \
    --cc=scott.norton@hpe.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome