[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9686e37d-5698-334d-5e23-70a1e2d804ec@huawei.com>
Date: Mon, 6 Apr 2020 16:00:32 +0800
From: "chengjian (D)" <cj.chengjian@...wei.com>
To: Valentin Schneider <valentin.schneider@....com>
CC: <vpillai@...italocean.com>, <aaron.lwe@...il.com>,
<aubrey.intel@...il.com>, <aubrey.li@...ux.intel.com>,
<fweisbec@...il.com>, <jdesfossez@...italocean.com>,
<joel@...lfernandes.org>, <joelaf@...gle.com>,
<keescook@...omium.org>, <kerrnel@...gle.com>,
<linux-kernel@...r.kernel.org>, <mgorman@...hsingularity.net>,
<mingo@...nel.org>, <naravamudan@...italocean.com>,
<pauld@...hat.com>, <pawan.kumar.gupta@...ux.intel.com>,
<pbonzini@...hat.com>, <peterz@...radead.org>, <pjt@...gle.com>,
<tglx@...utronix.de>, <tim.c.chen@...ux.intel.com>,
<torvalds@...ux-foundation.org>, <xiexiuqi@...wei.com>,
<huawei.libin@...wei.com>, <w.f@...wei.com>,
<linux-arm-kernel@...ts.infradead.org>,
Sudeep Holla <sudeep.holla@....com>,
"chengjian (D)" <cj.chengjian@...wei.com>
Subject: Re: [PATCH] sched/arm64: store cpu topology before
notify_cpu_starting
On 2020/4/1 21:23, Valentin Schneider wrote:
> (+LAKML, +Sudeep)
>
> On Wed, Apr 01 2020, Cheng Jian wrote:
>> when SCHED_CORE enabled, sched_cpu_starting() uses thread_sibling as
>> SMT_MASK to initialize rq->core, but only after store_cpu_topology(),
>> the thread_sibling is ready for use.
>>
>> notify_cpu_starting()
>> -> sched_cpu_starting() # use thread_sibling
>>
>> store_cpu_topology(cpu)
>> -> update_siblings_masks # set thread_sibling
>>
>> Fix this by doing notify_cpu_starting later, just like x86 do.
>>
> I haven't been following the sched core stuff closely; can't this
> rq->core assignment be done in sched_cpu_activate() instead? We already
> look at the cpu_smt_mask() in there, and it is valid (we go through the
> entirety of secondary_start_kernel() before getting anywhere near
> CPUHP_AP_ACTIVE).
>
> I don't think this breaks anything, but without this dependency in
> sched_cpu_starting() then there isn't really a reason for this move.
Yes, it is correct to put the rq-> core assignment in sched_cpu_active().
The cpu_smt_mask is already valid here.
I have made such an attempt on my own branch and passed the test.
Thank you.
-- Cheng Jian
Powered by blists - more mailing lists