From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932516AbcFCLhK (ORCPT ); Fri, 3 Jun 2016 07:37:10 -0400 Received: from merlin.infradead.org ([205.233.59.134]:51725 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932074AbcFCLhI (ORCPT ); Fri, 3 Jun 2016 07:37:08 -0400 Date: Fri, 3 Jun 2016 13:37:03 +0200 From: Peter Zijlstra To: Pan Xinhui Cc: linux-kernel@vger.kernel.org, mingo@redhat.com, waiman.long@hpe.com Subject: Re: [PATCH] locking/qspinlock: Use this_cpu_ptr instead of this_cpu_dec Message-ID: <20160603113703.GK3190@twins.programming.kicks-ass.net> References: <1464947330-3568-1-git-send-email-xinhui.pan@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1464947330-3568-1-git-send-email-xinhui.pan@linux.vnet.ibm.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 03, 2016 at 05:48:50PM +0800, Pan Xinhui wrote: > queued_spin_lock_slowpath should not worry about interrupt change > node->count by accident because ->count is inc and dec when we > enter/leave queued_spin_lock_slowpath. > > So this_cpu_dec() does some no point things here, lets use this_cpu_ptr > for a small optimization. Uhm, have you actually looked at what that does on x86?