Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Sudeep Holla <sudeep.holla@arm.com>
To: Gavin Shan <gshan@redhat.com>
Cc: linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, rafael@kernel.org,
	Jonathan.Cameron@huawei.com, drjones@redhat.com,
	zhenyzha@redhat.com, shan.gavin@gmail.com
Subject: Re: [PATCH] arch_topology: Limit threads to one specific cluster
Date: Tue, 24 May 2022 11:59:53 +0100	[thread overview]
Message-ID: <20220524105953.uhpgly4qkbvc2ayz@bogus> (raw)
In-Reply-To: <7cc4eef4-bdb6-bd53-450b-f2348f722cf5@redhat.com>

On Tue, May 24, 2022 at 05:05:22PM +0800, Gavin Shan wrote:
> Hi Sudeep,
> 
> On 5/24/22 4:51 PM, Sudeep Holla wrote:
> > On Tue, May 24, 2022 at 04:12:12PM +0800, Gavin Shan wrote:
> > > The sibling information for one particular CPU is updated after ACPI
> > > PPTT table is parsed. struct cpu_topology::thread_sibling tracks the
> > > the CPUs in same core. However, cluster isn't considered when it's
> > > populated. In this case, multiple threads belonging to different
> > > clusters can be put together through the sibling information. It
> > > eventually leads to unexpected warning from sched subsystem.
> > > 
> > > For example, the following warning is observed in a VM where we have
> > > 2 sockets, 4 clusters, 8 cores and 16 threads and the CPU topology
> > > is populated as below.
> > > 
> > >     CPU  Socket-ID  Cluster-ID  Core-ID  Thread-ID
> > >     ----------------------------------------------
> > >      0      0          0          0        0
> > >      1      0          0          0        1
> > >      2      0          0          1        0
> > >      3      0          0          1        1
> > >      4      0          1          0        0
> > >      5      0          1          0        1
> > >      6      0          1          1        0
> > >      7      0          1          1        1
> > >      8      1          0          0        0
> > >      9      1          0          0        1
> > >     10      1          0          1        0
> > >     11      1          0          1        1
> > >     12      1          1          0        0
> > >     13      1          1          0        1
> > >     14      1          1          1        0
> > >     15      1          1          1        1
> > > 
> > >    [    0.592181] CPU: All CPU(s) started at EL1
> > >    [    0.593766] alternatives: patching kernel code
> > >    [    0.595890] BUG: arch topology borken
> > >    [    0.597210]      the SMT domain not a subset of the CLS domain
> > >    [    0.599286]      child=0-1,4-5    sd=0-3
> > > 
> > >    # cat /sys/devices/system/cpu/cpu0/topology/cluster_cpus_list
> > >    0-3
> > >    # cat /sys/devices/system/cpu/cpu0/topology/thread_siblings_list
> > >    0-1,4-5
> > > 
> > > This fixes the issue by limiting threads to one specific cluster.
> > > With this applied, the unexpected warning disappears in the VM.
> > > 
> > 
> > I have similar fix but as part of bigger series[1] to get DT support in
> > line with ACPI.
> > 
> 
> Your patch resolves the issue I have. So please ignore mine. Sorry

Thanks for that.

> for the noise.
>

No worries, definitely not noise.

-- 
Regards,
Sudeep

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

      reply	other threads:[~2022-05-24 11:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-24  8:12 [PATCH] arch_topology: Limit threads to one specific cluster Gavin Shan
2022-05-24  8:51 ` Sudeep Holla
2022-05-24  9:05   ` Gavin Shan
2022-05-24 10:59     ` Sudeep Holla [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=20220524105953.uhpgly4qkbvc2ayz@bogus \
    --to=sudeep.holla@arm.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=drjones@redhat.com \
    --cc=gshan@redhat.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael@kernel.org \
    --cc=shan.gavin@gmail.com \
    --cc=zhenyzha@redhat.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: 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