linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Will Deacon <will.deacon@arm.com>
Cc: ard.biesheuvel@linaro.org,
	Catalin Marinas <catalin.marinas@arm.com>,
	open list <linux-kernel@vger.kernel.org>,
	bcm-kernel-feedback-list@Broadcom.com,
	linux-arm-kernel@vger.kernel.org,
	"moderated list:ARM64 PORT \(AARCH64 ARCHITECTURE\)"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] arm64: Allow user selection of ARM64_MODULE_PLTS
Date: Mon, 17 Jun 2019 11:03:28 -0700	[thread overview]
Message-ID: <2624ce8b-0206-a217-8793-c1223178246c@gmail.com> (raw)
In-Reply-To: <20190617173241.GM30800@fuggles.cambridge.arm.com>

On 6/17/19 10:32 AM, Will Deacon wrote:
> On Thu, Jun 13, 2019 at 07:59:32PM -0700, Florian Fainelli wrote:
>> Make ARM64_MODULE_PLTS a selectable Kconfig symbol, since some people
>> might have very big modules spilling out of the dedicated module area
>> into vmalloc. Help text is copied from the ARM 32-bit counterpart.
>>
>> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
>> ---
>>  arch/arm64/Kconfig | 14 +++++++++++++-
>>  1 file changed, 13 insertions(+), 1 deletion(-)
>>
>> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
>> index 697ea0510729..36befe987b73 100644
>> --- a/arch/arm64/Kconfig
>> +++ b/arch/arm64/Kconfig
>> @@ -1418,8 +1418,20 @@ config ARM64_SVE
>>  	  KVM in the same kernel image.
>>  
>>  config ARM64_MODULE_PLTS
>> -	bool
>> +	bool "Use PLTs to allow module memory to spill over into vmalloc area"
>>  	select HAVE_MOD_ARCH_SPECIFIC
>> +	help
>> +	  Allocate PLTs when loading modules so that jumps and calls whose
>> +	  targets are too far away for their relative offsets to be encoded
>> +	  in the instructions themselves can be bounced via veneers in the
>> +	  module's PLT. This allows modules to be allocated in the generic
>> +	  vmalloc area after the dedicated module memory area has been
>> +	  exhausted. The modules will use slightly more memory, but after
>> +	  rounding up to page size, the actual memory footprint is usually
>> +	  the same.
> 
> Isn't the worry really about the runtime performance overhead introduced
> by the veneers, as opposed to the memory usage of the module?

The main concern is indeed runtime performance (both added veneers and
possibly increased cache trashing) and second could be the increased
vmalloc usage. Do you want me to rephrase that part, or drop it?

> 
>> +	  Disabling this is usually safe for small single-platform
>> +	  configurations. If unsure, say y.
> 
> So should this be on by default?

It is turned on under certain conditions that require it (v2 makes that
clearer, based on Ard's feedback), having it turned off by default at
least makes people realize (or rather can be used as argument) that the
modules are possibly too big.

Under certain build configurations like test/manufacturing, you might
have a set of large modules that should still load, hence this patch.
-- 
Florian

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-06-17 18:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-14  2:59 [PATCH] arm64: Allow user selection of ARM64_MODULE_PLTS Florian Fainelli
2019-06-14  7:02 ` Ard Biesheuvel
2019-06-17 17:32 ` Will Deacon
2019-06-17 18:03   ` Florian Fainelli [this message]
2019-06-17 18:10     ` Will Deacon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2624ce8b-0206-a217-8793-c1223178246c@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=ard.biesheuvel@linaro.org \
    --cc=bcm-kernel-feedback-list@Broadcom.com \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-kernel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).