-----Original Message----- From: Tim Chen [mailto:tim.c.chen@linux.intel.com] Sent: Friday, July 23, 2021 8:59 AM To: Song Bao Hua (Barry Song) song.bao.hua@hisilicon.com; yangyicong yangyicong@huawei.com Cc: guodong.xu@linaro.org; tangchengchang tangchengchang@huawei.com; Zengtao (B) prime.zeng@hisilicon.com; Jonathan Cameron jonathan.cameron@huawei.com; chenxiang (M) chenxiang66@hisilicon.com; Linuxarm linuxarm@huawei.com; linaro-open-discussions@op-lists.linaro.org Subject: Re: [PATCH 1/4] sched: Add infrastructure to describe if cluster scheduler is really running
On 7/22/21 1:37 PM, Song Bao Hua (Barry Song) wrote:
Regarding squashing scheduler level, what you say is true. However, as long as we are changing code based on if(sched_cluster_present) in wake_affine path, we need to care about this.
I'm wondering if we can use SD_CLUSTER flag I introduced in my patch 2 sent yesterday to determine if we have a cluster sched domain instead of sched_cluster_present? So if we squash the cluster sched domain we'll skip the logic for the sched domain, instead of having a global flag.
Yes. I do agree we should check the existence of SD cluster domain and detect the case it is squashed. but in those cases we need to check if cluster scheduler is active, static key should still be the best choice. if(scheduler cluster active) dosomething().
The tricky thing is that smt is always the lowest level so we can safely use the smt mask=2 to determine if smt is enabled. but cluster is in the middle.
So I will be looking for some combination of SD_CLUSTER and static key.
If the CLS domain equals the MC domain, finally the CLS will stay and MC will be destroyed. Nothing need to do then. If the CLS domain equals the SMT domain, SMT will stay and we need to modify the @sched_cluster_present then. But I doubt whether there is a real case than CLS will be the same as SMT.
It doesn't matter if there is a real hardware. What does matter is how the topology patch(patch 1) will parse ACPI table and whether ACPI has a particular flag for cluster.
Thanks Barry