public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Shrikanth Hegde <sshegde@linux.ibm.com>,
	Christian Loehle <christian.loehle@arm.com>
Cc: x86@kernel.org, Vincent Guittot <vincent.guittot@linaro.org>,
	Ingo Molnar <mingo@redhat.com>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Pierre Gondois <pierre.gondois@arm.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH] sched: Make ASYM_PACKING compile-time arch config
Date: Wed, 23 Oct 2024 13:29:42 +1100	[thread overview]
Message-ID: <87ldyf3621.fsf@mail.lhotse> (raw)
In-Reply-To: <e7d7a3d8-4b4a-47ff-8d69-a4c2e75d6818@linux.ibm.com>

Shrikanth Hegde <sshegde@linux.ibm.com> writes:
> On 10/18/24 03:16, Christian Loehle wrote:
>> Only x86 and Power7 set SD_ASYM_PACKING at boot-time depending on the
>
> Power10 on Shared Processor LPAR also enables that.
>
>> system. All other platforms don't make use of asym-packing anyway,
>> so introduce auxiliary ARCH_HAS_SCHED_ASYM_PACKING and guard all the
>> related logic behind that so it isn't compiled when not needed.
>> 
>> On arm64 this reduces
>> size kernel/sched/fair.o
>>     text	   data	    bss	    dec	    hex	filename
>>    74120	   4097	     88	  78305	  131e1	kernel/sched/fair.o
>> to
>> size kernel/sched/fair.o
>>     text	   data	    bss	    dec	    hex	filename
>>    72896	   4065	     88	  77049	  12cf9	kernel/sched/fair.o
>> 
>> Most of that is on the load-balance hot-path, in particular
>> need_active_balance() reduces from 141 to 84 instructions.
>
> This patch sprinkes #ifdef across the code. IMHO it makes the code 
> difficult to read.

Yes, strong agree on that.

It should be possible to clean that up for the most part with some
static inline helpers with stubs for the disabled case, in the usual
kernel style.

Also Christian please Cc linuxppc-dev@lists.ozlabs.org on v2.

cheers

  reply	other threads:[~2024-10-23  2:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-17 21:46 [PATCH] sched: Make ASYM_PACKING compile-time arch config Christian Loehle
2024-10-18 14:22 ` Shrikanth Hegde
2024-10-23  2:29   ` Michael Ellerman [this message]
2024-10-23 10:19 ` Peter Zijlstra

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=87ldyf3621.fsf@mail.lhotse \
    --to=mpe@ellerman.id.au \
    --cc=christian.loehle@arm.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=pierre.gondois@arm.com \
    --cc=sshegde@linux.ibm.com \
    --cc=tglx@linutronix.de \
    --cc=vincent.guittot@linaro.org \
    --cc=x86@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox