From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752786AbcHLVjD (ORCPT ); Fri, 12 Aug 2016 17:39:03 -0400 Received: from mga02.intel.com ([134.134.136.20]:50543 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752297AbcHLVjC (ORCPT ); Fri, 12 Aug 2016 17:39:02 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,512,1464678000"; d="scan'208";a="1034694857" Subject: Re: [PATCH v5] x86/hpet: Reduce HPET counter read contention To: Waiman Long , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" References: <1471037130-60583-1-git-send-email-Waiman.Long@hpe.com> Cc: linux-kernel@vger.kernel.org, x86@kernel.org, Borislav Petkov , Andy Lutomirski , Prarit Bhargava , Scott J Norton , Douglas Hatch , Randy Wright From: Dave Hansen Message-ID: <57AE41F3.6030107@intel.com> Date: Fri, 12 Aug 2016 14:38:59 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <1471037130-60583-1-git-send-email-Waiman.Long@hpe.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/12/2016 02:25 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 the raw spinlock > + * size is 32-bit. So what happens when we have all the fun debugging options on? > typedef struct raw_spinlock { > arch_spinlock_t raw_lock; > #ifdef CONFIG_GENERIC_LOCKBREAK > unsigned int break_lock; > #endif > #ifdef CONFIG_DEBUG_SPINLOCK > unsigned int magic, owner_cpu; > void *owner; > #endif > #ifdef CONFIG_DEBUG_LOCK_ALLOC > struct lockdep_map dep_map; > #endif > } raw_spinlock_t;