From: "Song Bao Hua (Barry Song)" <song.bao.hua@hisilicon.com> To: Dietmar Eggemann <dietmar.eggemann@arm.com>, Morten Rasmussen <morten.rasmussen@arm.com>, Tim Chen <tim.c.chen@linux.intel.com> Cc: "valentin.schneider@arm.com" <valentin.schneider@arm.com>, "catalin.marinas@arm.com" <catalin.marinas@arm.com>, "will@kernel.org" <will@kernel.org>, "rjw@rjwysocki.net" <rjw@rjwysocki.net>, "vincent.guittot@linaro.org" <vincent.guittot@linaro.org>, "lenb@kernel.org" <lenb@kernel.org>, "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>, Jonathan Cameron <jonathan.cameron@huawei.com>, "mingo@redhat.com" <mingo@redhat.com>, "peterz@infradead.org" <peterz@infradead.org>, "juri.lelli@redhat.com" <juri.lelli@redhat.com>, "rostedt@goodmis.org" <rostedt@goodmis.org>, "bsegall@google.com" <bsegall@google.com>, "mgorman@suse.de" <mgorman@suse.de>, "mark.rutland@arm.com" <mark.rutland@arm.com>, "sudeep.holla@arm.com" <sudeep.holla@arm.com>, "aubrey.li@linux.intel.com" <aubrey.li@linux.intel.com>, "linux-arm-kernel@lists.infradead.org" <linux-arm-kernel@lists.infradead.org>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>, "linuxarm@openeuler.org" <linuxarm@openeuler.org>, "xuwei (O)" <xuwei5@huawei.com>, "Zengtao (B)" <prime.zeng@hisilicon.com>, "tiantao (H)" <tiantao6@hisilicon.com> Subject: RE: [RFC PATCH v3 0/2] scheduler: expose the topology of clusters and add cluster scheduler Date: Mon, 25 Jan 2021 10:50:06 +0000 [thread overview] Message-ID: <076088f4daf64727b1587b162eb08dda@hisilicon.com> (raw) In-Reply-To: <4fdc781e-7385-2ae6-d9c9-3ec165f473c4@arm.com> > -----Original Message----- > From: Dietmar Eggemann [mailto:dietmar.eggemann@arm.com] > Sent: Wednesday, January 13, 2021 12:00 AM > To: Morten Rasmussen <morten.rasmussen@arm.com>; Tim Chen > <tim.c.chen@linux.intel.com> > Cc: Song Bao Hua (Barry Song) <song.bao.hua@hisilicon.com>; > valentin.schneider@arm.com; catalin.marinas@arm.com; will@kernel.org; > rjw@rjwysocki.net; vincent.guittot@linaro.org; lenb@kernel.org; > gregkh@linuxfoundation.org; Jonathan Cameron <jonathan.cameron@huawei.com>; > mingo@redhat.com; peterz@infradead.org; juri.lelli@redhat.com; > rostedt@goodmis.org; bsegall@google.com; mgorman@suse.de; > mark.rutland@arm.com; sudeep.holla@arm.com; aubrey.li@linux.intel.com; > linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org; > linux-acpi@vger.kernel.org; linuxarm@openeuler.org; xuwei (O) > <xuwei5@huawei.com>; Zengtao (B) <prime.zeng@hisilicon.com>; tiantao (H) > <tiantao6@hisilicon.com> > Subject: Re: [RFC PATCH v3 0/2] scheduler: expose the topology of clusters and > add cluster scheduler > > On 11/01/2021 10:28, Morten Rasmussen wrote: > > On Fri, Jan 08, 2021 at 12:22:41PM -0800, Tim Chen wrote: > >> > >> > >> On 1/8/21 7:12 AM, Morten Rasmussen wrote: > >>> On Thu, Jan 07, 2021 at 03:16:47PM -0800, Tim Chen wrote: > >>>> On 1/6/21 12:30 AM, Barry Song wrote: > > [...] > > >> I think it is going to depend on the workload. If there are dependent > >> tasks that communicate with one another, putting them together > >> in the same cluster will be the right thing to do to reduce communication > >> costs. On the other hand, if the tasks are independent, putting them together > on the same cluster > >> will increase resource contention and spreading them out will be better. > > > > Agree. That is exactly where I'm coming from. This is all about the task > > placement policy. We generally tend to spread tasks to avoid resource > > contention, SMT and caches, which seems to be what you are proposing to > > extend. I think that makes sense given it can produce significant > > benefits. > > > >> > >> Any thoughts on what is the right clustering "tag" to use to clump > >> related tasks together? > >> Cgroup? Pid? Tasks with same mm? > > > > I think this is the real question. I think the closest thing we have at > > the moment is the wakee/waker flip heuristic. This seems to be related. > > Perhaps the wake_affine tricks can serve as starting point? > > wake_wide() switches between packing (select_idle_sibling(), llc_size > CPUs) and spreading (find_idlest_cpu(), all CPUs). > > AFAICS, since none of the sched domains set SD_BALANCE_WAKE, currently > all wakeups are (llc-)packed. Sorry for late response. I was struggling with some other topology issues recently. For "all wakeups are (llc-)packed", it seems you mean current want_affine is only affecting the new_cpu, and for wake-up path, we will always go to select_idle_sibling() rather than find_idlest_cpu() since nobody sets SD_WAKE_BALANCE in any sched_domain ? > > select_task_rq_fair() > > for_each_domain(cpu, tmp) > > if (tmp->flags & sd_flag) > sd = tmp; > > > In case we would like to further distinguish between llc-packing and > even narrower (cluster or MC-L2)-packing, we would introduce a 2. level > packing vs. spreading heuristic further down in sis(). I didn't get your point on "2 level packing". Would you like to describe more? It seems you mean we need to have separate calculation for avg_scan_cost and sched_feat(SIS_) for cluster (or MC-L2) since cluster and llc are not in the same level physically? > > IMHO, Barry's current implementation doesn't do this right now. Instead > he's trying to pack on cluster first and if not successful look further > among the remaining llc CPUs for an idle CPU. Yes. That is exactly what the current patch is doing. Thanks Barry
WARNING: multiple messages have this Message-ID (diff)
From: "Song Bao Hua (Barry Song)" <song.bao.hua@hisilicon.com> To: Dietmar Eggemann <dietmar.eggemann@arm.com>, Morten Rasmussen <morten.rasmussen@arm.com>, Tim Chen <tim.c.chen@linux.intel.com> Cc: "juri.lelli@redhat.com" <juri.lelli@redhat.com>, "mark.rutland@arm.com" <mark.rutland@arm.com>, "peterz@infradead.org" <peterz@infradead.org>, "catalin.marinas@arm.com" <catalin.marinas@arm.com>, "bsegall@google.com" <bsegall@google.com>, "xuwei \(O\)" <xuwei5@huawei.com>, "will@kernel.org" <will@kernel.org>, "vincent.guittot@linaro.org" <vincent.guittot@linaro.org>, "aubrey.li@linux.intel.com" <aubrey.li@linux.intel.com>, "linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>, "mingo@redhat.com" <mingo@redhat.com>, "mgorman@suse.de" <mgorman@suse.de>, "valentin.schneider@arm.com" <valentin.schneider@arm.com>, "lenb@kernel.org" <lenb@kernel.org>, "linuxarm@openeuler.org" <linuxarm@openeuler.org>, "rostedt@goodmis.org" <rostedt@goodmis.org>, "Zengtao \(B\)" <prime.zeng@hisilicon.com>, Jonathan Cameron <jonathan.cameron@huawei.com>, "linux-arm-kernel@lists.infradead.org" <linux-arm-kernel@lists.infradead.org>, "gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>, "rjw@rjwysocki.net" <rjw@rjwysocki.net>, "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>, "sudeep.holla@arm.com" <sudeep.holla@arm.com>, "tiantao \(H\)" <tiantao6@hisilicon.com> Subject: RE: [RFC PATCH v3 0/2] scheduler: expose the topology of clusters and add cluster scheduler Date: Mon, 25 Jan 2021 10:50:06 +0000 [thread overview] Message-ID: <076088f4daf64727b1587b162eb08dda@hisilicon.com> (raw) In-Reply-To: <4fdc781e-7385-2ae6-d9c9-3ec165f473c4@arm.com> > -----Original Message----- > From: Dietmar Eggemann [mailto:dietmar.eggemann@arm.com] > Sent: Wednesday, January 13, 2021 12:00 AM > To: Morten Rasmussen <morten.rasmussen@arm.com>; Tim Chen > <tim.c.chen@linux.intel.com> > Cc: Song Bao Hua (Barry Song) <song.bao.hua@hisilicon.com>; > valentin.schneider@arm.com; catalin.marinas@arm.com; will@kernel.org; > rjw@rjwysocki.net; vincent.guittot@linaro.org; lenb@kernel.org; > gregkh@linuxfoundation.org; Jonathan Cameron <jonathan.cameron@huawei.com>; > mingo@redhat.com; peterz@infradead.org; juri.lelli@redhat.com; > rostedt@goodmis.org; bsegall@google.com; mgorman@suse.de; > mark.rutland@arm.com; sudeep.holla@arm.com; aubrey.li@linux.intel.com; > linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org; > linux-acpi@vger.kernel.org; linuxarm@openeuler.org; xuwei (O) > <xuwei5@huawei.com>; Zengtao (B) <prime.zeng@hisilicon.com>; tiantao (H) > <tiantao6@hisilicon.com> > Subject: Re: [RFC PATCH v3 0/2] scheduler: expose the topology of clusters and > add cluster scheduler > > On 11/01/2021 10:28, Morten Rasmussen wrote: > > On Fri, Jan 08, 2021 at 12:22:41PM -0800, Tim Chen wrote: > >> > >> > >> On 1/8/21 7:12 AM, Morten Rasmussen wrote: > >>> On Thu, Jan 07, 2021 at 03:16:47PM -0800, Tim Chen wrote: > >>>> On 1/6/21 12:30 AM, Barry Song wrote: > > [...] > > >> I think it is going to depend on the workload. If there are dependent > >> tasks that communicate with one another, putting them together > >> in the same cluster will be the right thing to do to reduce communication > >> costs. On the other hand, if the tasks are independent, putting them together > on the same cluster > >> will increase resource contention and spreading them out will be better. > > > > Agree. That is exactly where I'm coming from. This is all about the task > > placement policy. We generally tend to spread tasks to avoid resource > > contention, SMT and caches, which seems to be what you are proposing to > > extend. I think that makes sense given it can produce significant > > benefits. > > > >> > >> Any thoughts on what is the right clustering "tag" to use to clump > >> related tasks together? > >> Cgroup? Pid? Tasks with same mm? > > > > I think this is the real question. I think the closest thing we have at > > the moment is the wakee/waker flip heuristic. This seems to be related. > > Perhaps the wake_affine tricks can serve as starting point? > > wake_wide() switches between packing (select_idle_sibling(), llc_size > CPUs) and spreading (find_idlest_cpu(), all CPUs). > > AFAICS, since none of the sched domains set SD_BALANCE_WAKE, currently > all wakeups are (llc-)packed. Sorry for late response. I was struggling with some other topology issues recently. For "all wakeups are (llc-)packed", it seems you mean current want_affine is only affecting the new_cpu, and for wake-up path, we will always go to select_idle_sibling() rather than find_idlest_cpu() since nobody sets SD_WAKE_BALANCE in any sched_domain ? > > select_task_rq_fair() > > for_each_domain(cpu, tmp) > > if (tmp->flags & sd_flag) > sd = tmp; > > > In case we would like to further distinguish between llc-packing and > even narrower (cluster or MC-L2)-packing, we would introduce a 2. level > packing vs. spreading heuristic further down in sis(). I didn't get your point on "2 level packing". Would you like to describe more? It seems you mean we need to have separate calculation for avg_scan_cost and sched_feat(SIS_) for cluster (or MC-L2) since cluster and llc are not in the same level physically? > > IMHO, Barry's current implementation doesn't do this right now. Instead > he's trying to pack on cluster first and if not successful look further > among the remaining llc CPUs for an idle CPU. Yes. That is exactly what the current patch is doing. Thanks Barry _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-01-25 11:30 UTC|newest] Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-01-06 8:30 [RFC PATCH v3 0/2] scheduler: expose the topology of clusters and add cluster scheduler Barry Song 2021-01-06 8:30 ` Barry Song 2021-01-06 8:30 ` [RFC PATCH v3 1/2] topology: Represent clusters of CPUs within a die Barry Song 2021-01-06 8:30 ` Barry Song 2021-02-09 22:48 ` Masayoshi Mizuma 2021-02-09 22:48 ` Masayoshi Mizuma 2021-01-06 8:30 ` [RFC PATCH v3 2/2] scheduler: add scheduler level for clusters Barry Song 2021-01-06 8:30 ` Barry Song 2021-01-06 10:14 ` kernel test robot 2021-01-06 16:29 ` Vincent Guittot 2021-01-06 16:29 ` Vincent Guittot 2021-01-06 20:09 ` Song Bao Hua (Barry Song) 2021-01-06 20:09 ` Song Bao Hua (Barry Song) 2021-01-07 23:16 ` [RFC PATCH v3 0/2] scheduler: expose the topology of clusters and add cluster scheduler Tim Chen 2021-01-07 23:16 ` Tim Chen 2021-01-08 15:12 ` Morten Rasmussen 2021-01-08 15:12 ` Morten Rasmussen 2021-01-08 20:22 ` Tim Chen 2021-01-08 20:22 ` Tim Chen 2021-01-11 9:28 ` Morten Rasmussen 2021-01-11 9:28 ` Morten Rasmussen 2021-01-12 11:00 ` Dietmar Eggemann 2021-01-12 11:00 ` Dietmar Eggemann 2021-01-25 10:50 ` Song Bao Hua (Barry Song) [this message] 2021-01-25 10:50 ` Song Bao Hua (Barry Song) 2021-01-26 11:02 ` Dietmar Eggemann 2021-01-26 11:02 ` Dietmar Eggemann 2021-04-13 10:45 ` Song Bao Hua (Barry Song) 2021-04-13 10:45 ` Song Bao Hua (Barry Song) 2021-04-13 19:00 ` Tim Chen 2021-04-13 19:00 ` Tim Chen 2021-01-08 21:30 ` Song Bao Hua (Barry Song) 2021-01-08 21:30 ` Song Bao Hua (Barry Song) 2021-01-12 12:53 ` Dietmar Eggemann 2021-01-12 12:53 ` Dietmar Eggemann 2021-01-25 11:12 ` Song Bao Hua (Barry Song) 2021-01-25 11:12 ` Song Bao Hua (Barry Song) 2021-02-03 11:32 ` Song Bao Hua (Barry Song) 2021-02-03 11:32 ` Song Bao Hua (Barry Song) 2021-02-16 18:04 ` Tim Chen 2021-02-16 18:04 ` Tim Chen
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=076088f4daf64727b1587b162eb08dda@hisilicon.com \ --to=song.bao.hua@hisilicon.com \ --cc=aubrey.li@linux.intel.com \ --cc=bsegall@google.com \ --cc=catalin.marinas@arm.com \ --cc=dietmar.eggemann@arm.com \ --cc=gregkh@linuxfoundation.org \ --cc=jonathan.cameron@huawei.com \ --cc=juri.lelli@redhat.com \ --cc=lenb@kernel.org \ --cc=linux-acpi@vger.kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linuxarm@openeuler.org \ --cc=mark.rutland@arm.com \ --cc=mgorman@suse.de \ --cc=mingo@redhat.com \ --cc=morten.rasmussen@arm.com \ --cc=peterz@infradead.org \ --cc=prime.zeng@hisilicon.com \ --cc=rjw@rjwysocki.net \ --cc=rostedt@goodmis.org \ --cc=sudeep.holla@arm.com \ --cc=tiantao6@hisilicon.com \ --cc=tim.c.chen@linux.intel.com \ --cc=valentin.schneider@arm.com \ --cc=vincent.guittot@linaro.org \ --cc=will@kernel.org \ --cc=xuwei5@huawei.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: linkBe 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.