From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755833AbdJJBeL (ORCPT ); Mon, 9 Oct 2017 21:34:11 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43762 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754707AbdJJBeJ (ORCPT ); Mon, 9 Oct 2017 21:34:09 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 6F9A9C04AC6E Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=longman@redhat.com Subject: Re: [PATCH v2 4/5] arm64: locking: Move rwlock implementation over to qrwlocks To: Will Deacon , linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Jeremy.Linton@arm.com, peterz@infradead.org, mingo@redhat.com, boqun.feng@gmail.com, paulmck@linux.vnet.ibm.com References: <1507296882-18721-1-git-send-email-will.deacon@arm.com> <1507296882-18721-5-git-send-email-will.deacon@arm.com> From: Waiman Long Organization: Red Hat Message-ID: <909c3e84-745c-20db-a071-f9e0f2cbe63a@redhat.com> Date: Mon, 9 Oct 2017 21:34:08 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: <1507296882-18721-5-git-send-email-will.deacon@arm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 10 Oct 2017 01:34:09 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/06/2017 09:34 AM, Will Deacon wrote: > Now that the qrwlock can make use of WFE, remove our homebrew rwlock > code in favour of the generic queued implementation. > > Signed-off-by: Will Deacon > --- > arch/arm64/Kconfig | 17 ++++ > arch/arm64/include/asm/Kbuild | 1 + > arch/arm64/include/asm/spinlock.h | 164 +------------------------------- > arch/arm64/include/asm/spinlock_types.h | 6 +- > 4 files changed, 20 insertions(+), 168 deletions(-) > > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > index 0df64a6a56d4..6d32c9b0d4bb 100644 > --- a/arch/arm64/Kconfig > +++ b/arch/arm64/Kconfig > @@ -22,7 +22,24 @@ config ARM64 > select ARCH_HAS_STRICT_MODULE_RWX > select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST > select ARCH_HAVE_NMI_SAFE_CMPXCHG if ACPI_APEI_SEA > + select ARCH_INLINE_READ_LOCK if !PREEMPT > + select ARCH_INLINE_READ_LOCK_BH if !PREEMPT > + select ARCH_INLINE_READ_LOCK_IRQ if !PREEMPT > + select ARCH_INLINE_READ_LOCK_IRQSAVE if !PREEMPT > + select ARCH_INLINE_READ_UNLOCK if !PREEMPT > + select ARCH_INLINE_READ_UNLOCK_BH if !PREEMPT > + select ARCH_INLINE_READ_UNLOCK_IRQ if !PREEMPT > + select ARCH_INLINE_READ_UNLOCK_IRQSAVE if !PREEMPT > + select ARCH_INLINE_WRITE_LOCK if !PREEMPT > + select ARCH_INLINE_WRITE_LOCK_BH if !PREEMPT > + select ARCH_INLINE_WRITE_LOCK_IRQ if !PREEMPT > + select ARCH_INLINE_WRITE_LOCK_IRQSAVE if !PREEMPT > + select ARCH_INLINE_WRITE_UNLOCK if !PREEMPT > + select ARCH_INLINE_WRITE_UNLOCK_BH if !PREEMPT > + select ARCH_INLINE_WRITE_UNLOCK_IRQ if !PREEMPT > + select ARCH_INLINE_WRITE_UNLOCK_IRQSAVE if !PREEMPT > select ARCH_USE_CMPXCHG_LOCKREF > + select ARCH_USE_QUEUED_RWLOCKS > select ARCH_SUPPORTS_MEMORY_FAILURE > select ARCH_SUPPORTS_ATOMIC_RMW > select ARCH_SUPPORTS_NUMA_BALANCING Inlining is good for performance, but it may come with an increase in kernel text size. Inlining unlock and unlock_irq are OK, but the other inlines will increase the text size of the kernel. Have you measured how much size increase will that be? Is there any concern about the increased text size? Cheers, Longman