From: Waiman Long Subject: Re: [PATCH v2 3/5] locking/qspinlock: Introduce CNA into the slow path of qspinlock Date: Thu, 6 Jun 2019 11:42:09 -0400 Message-ID: References: <20190329152006.110370-1-alex.kogan@oracle.com> <20190329152006.110370-4-alex.kogan@oracle.com> <60a3a2d8-d222-73aa-2df1-64c9d3fa3241@redhat.com> <20190402094320.GM11158@hirez.programming.kicks-ass.net> <6AEDE4F2-306A-4DF9-9307-9E3517C68A2B@oracle.com> <20190403160112.GK4038@hirez.programming.kicks-ass.net> <20190605204003.GC3402@hirez.programming.kicks-ass.net> <6426D627-77EE-471C-B02A-A85271B666E9@oracle.com> <409b5d52-1f7d-7f60-04c7-e791e069239f@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <409b5d52-1f7d-7f60-04c7-e791e069239f@redhat.com> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org To: Alex Kogan , Peter Zijlstra Cc: linux@armlinux.org.uk, mingo@redhat.com, will.deacon@arm.com, arnd@arndb.de, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Thomas Gleixner , bp@alien8.de, hpa@zytor.com, x86@kernel.org, Steven Sistare , Daniel Jordan , dave.dice@oracle.com, Rahul Yadav List-Id: linux-arch.vger.kernel.org On 6/6/19 11:32 AM, Waiman Long wrote: > On 6/6/19 11:21 AM, Alex Kogan wrote: >>>> Also, the paravirt code is under arch/x86, while CNA is generic (not >>>> x86-specific). Do you still want to see CNA-related patching residing >>>> under arch/x86? >>>> >>>> We still need a config option (something like NUMA_AWARE_SPINLOCKS) to >>>> enable CNA patching under this config only, correct? >>> There is the static_call() stuff that could be generic; I posted a new >>> version of that today (x86 only for now, but IIRC there's arm64 patches >>> for that around somewhere too). >> The static_call technique appears as the more desirable long-term approach, but I think it would be prudent to keep the patches decoupled for now so we can move forward with less entanglements. >> So unless anyone objects, we will work on plugging into the existing patching for pv. >> And we will keep that code under arch/x86, but will be open for any suggestion to move it elsewhere. >> > If you mean making the CNV code depends on PARAVIRT_SPINLOCKS for now, > that is fine. The code should be under kernel/locking. You shouldn't put > it somewhere under arch/x86. I mean the core CNV code should be under kernel/locking. The paravirt specific code, however, should be close to the current paravirt code which is under arch/x86. -Longman