From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH v2] arm: reduce power use by contented spin locks with WFE/SEV Date: Tue, 15 Sep 2015 12:17:02 +0100 Message-ID: <1442315822.3549.379.camel@citrix.com> References: <1438601359-2576-1-git-send-email-ian.campbell@citrix.com> <1442312907.3549.368.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Stefano Stabellini Cc: wei.liu2@citrix.com, andrew.cooper3@citrix.com, xen-devel@lists.xen.org, julien.grall@citrix.com, David Vrabel , jbeulich@suse.com List-Id: xen-devel@lists.xenproject.org On Tue, 2015-09-15 at 11:39 +0100, Stefano Stabellini wrote: > On Tue, 15 Sep 2015, Ian Campbell wrote: > > On Mon, 2015-08-03 at 12:29 +0100, Ian Campbell wrote: > > > From: David Vrabel > > > > > > Instead of cpu_relax() while spinning and observing the ticket head, > > > introduce arch_lock_relax() which executes a WFE instruction. After > > > the ticket head is changed call arch_lock_signal() to execute an SEV > > > instruction (with the required DSB first) to wake any spinners. > > > > > > This should improve power consumption when locks are contented and > > > spinning. > > > > > > For consistency also move arch_lock_(acquire|release)_barrier to > > > asm/spinlock.h. > > > > > > Booted the result on arm32 (Midway) and arm64 (Mustang). Build test > > > only on amd64. > > > > > > Signed-off-by: David Vrabel > > > [ijc: add barrier, rename as arch_lock_*, move arch_lock_*_barrier, > > > test] > > > Signed-off-by: Ian Campbell > > > Cc: Stefano Stabellini > > > Cc: Jan Beulich > > > Cc: Andrew Cooper > > > > Andy has Reviewed-by but this change still lacks an Ack from the ARM > > side. > > Stefano, was your previous "The code should work though." intended as > > an > > Ack? > > Yes Applied then. thanks. Ian.