mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shrikanth Hegde <sshegde@linux.vnet.ibm.com>
To: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Cc: Juri Lelli <juri.lelli@redhat.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Ricardo Neri <ricardo.neri@intel.com>,
	"Ravi V. Shankar" <ravi.v.shankar@intel.com>,
	Ben Segall <bsegall@google.com>,
	Daniel Bristot de Oliveira <bristot@redhat.com>,
	Dietmar Eggemann <dietmar.eggemann@arm.com>,
	Len Brown <len.brown@intel.com>, Mel Gorman <mgorman@suse.de>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Tim Chen <tim.c.chen@linux.intel.com>,
	Valentin Schneider <vschneid@redhat.com>,
	Ionela Voinescu <ionela.voinescu@arm.com>,
	x86@kernel.org, linux-kernel@vger.kernel.org,
	Srikar Dronamraju <srikar@linux.vnet.ibm.com>,
	naveen.n.rao@linux.vnet.ibm.com,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH v4 00/12] sched: Avoid unnecessary migrations within SMT domains
Date: Mon, 22 May 2023 13:25:54 +0530	[thread overview]
Message-ID: <69a4403e-354c-7380-56e0-d311a5d1d918@linux.vnet.ibm.com> (raw)
In-Reply-To: <20230519000335.GB24449@ranerica-svr.sc.intel.com>



On 5/19/23 5:33 AM, Ricardo Neri wrote:
> On Fri, May 12, 2023 at 11:53:48PM +0530, Shrikanth Hegde wrote:
>>
>>
>> On 4/29/23 9:02 PM, Peter Zijlstra wrote:
>>> On Thu, Apr 06, 2023 at 01:31:36PM -0700, Ricardo Neri wrote:
>>>> Hi,
>>>>
>>>> This is v4 of this series. Previous versions can be found here [1], [2],
>>>> and here [3]. To avoid duplication, I do not include the cover letter of
>>>> the original submission. You can read it in [1].
>>>>
>>>> This patchset applies cleanly on today's master branch of the tip tree.
>>>>
>>>> Changes since v3:
>>>>
>>>> Nobody liked the proposed changes to the setting of prefer_sibling.
>>>> Instead, I tweaked the solution that Dietmar proposed. Now the busiest
>>>> group, not the local group, determines the setting of prefer_sibling.
>>>>
>>>> Vincent suggested improvements to the logic to decide whether to follow
>>>> asym_packing priorities. Peter suggested to wrap that in a helper function.
>>>> I added sched_use_asym_prio().
>>>>
>>>> Ionela found that removing SD_ASYM_PACKING from the SMT domain in x86
>>>> rendered sd_asym_packing NULL in SMT cores. Now highest_flag_domain()
>>>> does not assume that all child domains have the requested flag.
>>>>
>>>> Tim found that asym_active_balance() needs to also check for the idle
>>>> states of the SMT siblings of lb_env::dst_cpu. I added such check.
>>>>
>>>> I wrongly assumed that asym_packing could only be used when the busiest
>>>> group had exactly one busy CPU. This broke asym_packing balancing at the
>>>> DIE domain. I limited this check to balances between cores at the MC
>>>> level.
>>>>
>>>> As per suggestion from Dietmar, I removed sched_asym_smt_can_pull_tasks()
>>>> and placed its logic in sched_asym(). Also, sched_asym() uses
>>>> sched_smt_active() to skip checks when not needed.
>>>>
>>>> I also added a patch from Chen Yu to enable asym_packing balancing in
>>>> Meteor Lake, which has CPUs of different maximum frequency in more than
>>>> one die.
>>>
>>> Is the actual topology of Meteor Lake already public? This patch made me
>>> wonder if we need SCHED_CLUSTER topology in the hybrid_topology thing,
>>> but I can't remember (one of the raisins why the endless calls are such
>>> a frigging waste of time) and I can't seem to find the answer using
>>> Google either.
>>>
>>>> Hopefully, these patches are in sufficiently good shape to be merged?
>>>
>>> Changelogs are very sparse towards the end and I had to reverse engineer
>>> some of it which is a shame. But yeah, on a first reading the code looks
>>> mostly ok. Specifically 8-10 had me WTF a bit and only at 11 did it
>>> start to make a little sense. Mostly they utterly fail to answer the
>>> very fundament "why did you do this" question.
>>>
>>> Also, you seem to have forgotten to Cc our friends from IBM such that
>>> they might verify you didn't break their Power7 stuff -- or do you have
>>> a Power7 yourself to verify and forgot to mention that?
>>
>> Very good patch series in addressing asym packing. Interesting discussions as
>> well. Took me quite sometime to get through to understand and do a little bit
>> of testing.
>>
>> Tested this patch a bit on power7 with qemu. Tested with SMT=4. sched domains
>> show ASYM_PACKING present only for SMT domain.
>>
>> We don't see any regressions/gain due to patch. SMT priorities are honored when
>> tasks are scheduled and load_balanced.
> 
> Thank you very much for your review and testing! Would you mind sharing the
> qemu command you use? I would like to test my future patches on power7.

Sure. I tried this qemu command on a Power9 system. It loads in compat mode.
This would simulate 4Core and SMT4 
you need the have CONFIG_POWER7_CPU=y and CONFIG_CPU_BIG_ENDIAN=y and right
qcow2 image. 

qemu-system-ppc64 -M pseries,accel=kvm,max-cpu-compat=power7 -m 8192 -smp cores=4,threads=4 -enable-kvm  -drive file=<qcow2_image>,format=qcow2 -vga none -nographic -net nic -net user,hostfwd=tcp::2222-:22 -kernel ./<custom_vmlinux> --append "noautotest root=/dev/sda2"


> 
> BR,
> Ricardo

      reply	other threads:[~2023-05-22  7:58 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-06 20:31 Ricardo Neri
2023-04-06 20:31 ` [PATCH v4 01/12] sched/fair: Move is_core_idle() out of CONFIG_NUMA Ricardo Neri
2023-05-10 13:49   ` [tip: sched/core] " tip-bot2 for Ricardo Neri
2023-04-06 20:31 ` [PATCH v4 02/12] sched/fair: Only do asym_packing load balancing from fully idle SMT cores Ricardo Neri
2023-05-10 13:49   ` [tip: sched/core] " tip-bot2 for Ricardo Neri
2023-04-06 20:31 ` [PATCH v4 03/12] sched/fair: Simplify asym_packing logic for " Ricardo Neri
2023-05-10 13:49   ` [tip: sched/core] " tip-bot2 for Ricardo Neri
2023-04-06 20:31 ` [PATCH v4 04/12] sched/fair: Let low-priority cores help high-priority busy " Ricardo Neri
2023-05-10 13:49   ` [tip: sched/core] " tip-bot2 for Ricardo Neri
2023-04-06 20:31 ` [PATCH v4 05/12] sched/fair: Keep a fully_busy SMT sched group as busiest Ricardo Neri
2023-05-10 13:49   ` [tip: sched/core] " tip-bot2 for Ricardo Neri
2023-05-12 18:41   ` [PATCH v4 05/12] " Shrikanth Hegde
2023-05-19  0:01     ` Ricardo Neri
2023-04-06 20:31 ` [PATCH v4 06/12] sched/fair: Use the busiest group to set prefer_sibling Ricardo Neri
2023-05-10 13:49   ` [tip: sched/core] " tip-bot2 for Ricardo Neri
2023-04-06 20:31 ` [PATCH v4 07/12] sched/fair: Do not even the number of busy CPUs via asym_packing Ricardo Neri
2023-05-10 13:49   ` [tip: sched/core] " tip-bot2 for Ricardo Neri
2023-04-06 20:31 ` [PATCH v4 08/12] sched/topology: Check SDF_SHARED_CHILD in highest_flag_domain() Ricardo Neri
2023-05-10 13:49   ` [tip: sched/core] " tip-bot2 for Ricardo Neri
2023-04-06 20:31 ` [PATCH v4 09/12] sched/topology: Remove SHARED_CHILD from ASYM_PACKING Ricardo Neri
2023-05-10 13:49   ` [tip: sched/core] " tip-bot2 for Ricardo Neri
2023-04-06 20:31 ` [PATCH v4 10/12] x86/sched: Remove SD_ASYM_PACKING from the SMT domain flags Ricardo Neri
2023-05-10 13:49   ` [tip: sched/core] " tip-bot2 for Ricardo Neri
2023-04-06 20:31 ` [PATCH v4 11/12] x86/sched/itmt: Give all SMT siblings of a core the same priority Ricardo Neri
2023-05-10 13:49   ` [tip: sched/core] " tip-bot2 for Ricardo Neri
2023-04-06 20:31 ` [PATCH v4 12/12] x86/sched: Add the SD_ASYM_PACKING flag to the die domain of hybrid processors Ricardo Neri
2023-05-10 13:49   ` [tip: sched/core] " tip-bot2 for Chen Yu
2023-04-29 15:32 ` [PATCH v4 00/12] sched: Avoid unnecessary migrations within SMT domains Peter Zijlstra
2023-05-01 18:30   ` Tim Chen
2023-05-02  1:42   ` Ricardo Neri
2023-05-02  1:52     ` Steven Rostedt
2023-05-12 18:23   ` Shrikanth Hegde
2023-05-19  0:03     ` Ricardo Neri
2023-05-22  7:55       ` Shrikanth Hegde [this message]

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=69a4403e-354c-7380-56e0-d311a5d1d918@linux.vnet.ibm.com \
    --to=sshegde@linux.vnet.ibm.com \
    --cc=bristot@redhat.com \
    --cc=bsegall@google.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=ionela.voinescu@arm.com \
    --cc=juri.lelli@redhat.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@suse.de \
    --cc=naveen.n.rao@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=ravi.v.shankar@intel.com \
    --cc=ricardo.neri-calderon@linux.intel.com \
    --cc=ricardo.neri@intel.com \
    --cc=rostedt@goodmis.org \
    --cc=srikar@linux.vnet.ibm.com \
    --cc=srinivas.pandruvada@linux.intel.com \
    --cc=tim.c.chen@linux.intel.com \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.com \
    --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

all inboxes | Powered by JetHome®