All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Segher Boessenkool <segher@kernel.crashing.org>,
	Michael Ellerman <mpe@ellerman.id.au>
Cc: "ajd@linux.ibm.com" <ajd@linux.ibm.com>,
	"peterz@infradead.org" <peterz@infradead.org>,
	"rostedt@goodmis.org" <rostedt@goodmis.org>,
	"ardb@kernel.org" <ardb@kernel.org>,
	"jbaron@akamai.com" <jbaron@akamai.com>,
	"npiggin@gmail.com" <npiggin@gmail.com>,
	Benjamin Gray <bgray@linux.ibm.com>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	"jpoimboe@kernel.org" <jpoimboe@kernel.org>
Subject: Re: [PATCH v3 5/6] powerpc/64: Add support for out-of-line static calls
Date: Thu, 6 Oct 2022 18:38:00 +0000	[thread overview]
Message-ID: <2bb8accb-30c0-67e6-7ad5-36c02d46a2cd@csgroup.eu> (raw)
In-Reply-To: <20221006182254.GR25951@gate.crashing.org>



Le 06/10/2022 à 20:22, Segher Boessenkool a écrit :
> On Thu, Oct 06, 2022 at 11:39:50AM +1100, Michael Ellerman wrote:
>> Christophe Leroy <christophe.leroy@csgroup.eu> writes:
>>> However, thinking out loudly, I'm wondering, could we make things any
>>> simpler when CONFIG_MODULES is not selected, or is that a too much
>>> corner case on PPC64 ?
>>
>> I'd say it's mostly a corner case.
>>
>> Obviously no distros ship with modules disabled.
>>
>> AFAIK even the stripped down kernels we use in CPU bringup have modules
>> enabled.
>>
>> So I think it's probably not worth worrying about, unless there's an
>> obvious and fairly simple optimisation.
> 
> Long ago I built kernels that fit together with the boot firmware and a
> root fs (busybox+dropbear essentially) in 4MB, but I doubt we can get
> close to that at all these days :-)

4MB, not easy. But 8M still achievable. Well our smaller board has 32M, 
we have thousands of it spread all over Europe and have to keep it up to 
date ....

> 
> What is the overhead if you enable modules but do not use them, these
> days?
> 

On the 8xx it is mainly the instruction TLB miss handler:

#ifdef CONFIG_MODULES
	mfcr	r11
	not.	r10, r10
#endif
	mfspr	r10, SPRN_M_TWB	/* Get level 1 table */
#ifdef CONFIG_MODULES
	blt+	3f
	rlwinm	r10, r10, 0, 20, 31
	oris	r10, r10, (swapper_pg_dir - PAGE_OFFSET)@ha
3:
	mtcr	r11
#endif


And also some patches which have a interesting impact, like commit 
cb3ac45214c0 ("powerpc/code-patching: Don't call 
is_vmalloc_or_module_addr() without CONFIG_MODULES")


On the other hand, if we want one day to replace nftables by BPF jitted 
iptables, CONFIG_MODULES will be required. So what will be the 
trade-off, don't know yet because BPF is not yet cross-compile friendly.

Christophe

  reply	other threads:[~2022-10-06 18:39 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-05  5:32 [PATCH v3 0/6] Out-of-line static calls for powerpc64 ELF V2 Benjamin Gray
2022-10-05  5:32 ` [PATCH v3 1/6] powerpc/code-patching: Implement generic text patching function Benjamin Gray
2022-10-05 17:55   ` Christophe Leroy
2022-10-06  3:36     ` Benjamin Gray
2022-10-06  9:19       ` Christophe Leroy
2022-10-06 21:53         ` Benjamin Gray
2022-10-05  5:32 ` [PATCH v3 2/6] powerpc/module: Handle caller-saved TOC in module linker Benjamin Gray
2022-10-05 19:18   ` Christophe Leroy
2022-10-06  3:51     ` Andrew Donnellan
2022-10-06  4:39     ` Benjamin Gray
2022-10-05  5:32 ` [PATCH v3 3/6] powerpc/module: Optimise nearby branches in ELF V2 ABI stub Benjamin Gray
2022-10-05 19:21   ` Christophe Leroy
2022-10-06  8:24   ` Andrew Donnellan
2022-10-05  5:32 ` [PATCH v3 4/6] static_call: Move static call selftest to static_call_selftest.c Benjamin Gray
2022-10-05 19:22   ` Christophe Leroy
2022-10-05  5:32 ` [PATCH v3 5/6] powerpc/64: Add support for out-of-line static calls Benjamin Gray
2022-10-05 19:38   ` Christophe Leroy
2022-10-06  0:39     ` Michael Ellerman
2022-10-06  5:01       ` Benjamin Gray
2022-10-06 18:22       ` Segher Boessenkool
2022-10-06 18:38         ` Christophe Leroy [this message]
2022-10-06 20:45           ` Segher Boessenkool
2022-10-06 20:50             ` Christophe Leroy
2022-10-06 21:04               ` Segher Boessenkool
2022-10-05  5:32 ` [PATCH v3 6/6] powerpc: Add tests " Benjamin Gray

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=2bb8accb-30c0-67e6-7ad5-36c02d46a2cd@csgroup.eu \
    --to=christophe.leroy@csgroup.eu \
    --cc=ajd@linux.ibm.com \
    --cc=ardb@kernel.org \
    --cc=bgray@linux.ibm.com \
    --cc=jbaron@akamai.com \
    --cc=jpoimboe@kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=npiggin@gmail.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=segher@kernel.crashing.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.