[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <DM4PR12MB5278AFE3DA531200BE960EED9CFF9@DM4PR12MB5278.namprd12.prod.outlook.com>
Date: Tue, 10 Jan 2023 15:02:52 +0000
From: "Yuan, Perry" <Perry.Yuan@....com>
To: "Rafael J. Wysocki" <rafael@...nel.org>
CC: "rafael.j.wysocki@...el.com" <rafael.j.wysocki@...el.com>,
"Limonciello, Mario" <Mario.Limonciello@....com>,
"Huang, Ray" <Ray.Huang@....com>,
"viresh.kumar@...aro.org" <viresh.kumar@...aro.org>,
"Sharma, Deepak" <Deepak.Sharma@....com>,
"Fontenot, Nathan" <Nathan.Fontenot@....com>,
"Deucher, Alexander" <Alexander.Deucher@....com>,
"Huang, Shimmer" <Shimmer.Huang@....com>,
"Du, Xiaojian" <Xiaojian.Du@....com>,
"Meng, Li (Jassmine)" <Li.Meng@....com>,
"Karny, Wyes" <Wyes.Karny@....com>,
"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v2] cpufreq: amd-pstate: fix kernel hang issue while
amd-pstate unregistering
[AMD Official Use Only - General]
Hi Rafael:
> -----Original Message-----
> From: Rafael J. Wysocki <rafael@...nel.org>
> Sent: Tuesday, January 10, 2023 8:58 PM
> To: Yuan, Perry <Perry.Yuan@....com>
> Cc: rafael.j.wysocki@...el.com; Limonciello, Mario
> <Mario.Limonciello@....com>; Huang, Ray <Ray.Huang@....com>;
> viresh.kumar@...aro.org; Sharma, Deepak <Deepak.Sharma@....com>;
> Fontenot, Nathan <Nathan.Fontenot@....com>; Deucher, Alexander
> <Alexander.Deucher@....com>; Huang, Shimmer
> <Shimmer.Huang@....com>; Du, Xiaojian <Xiaojian.Du@....com>; Meng,
> Li (Jassmine) <Li.Meng@....com>; Karny, Wyes <Wyes.Karny@....com>;
> linux-pm@...r.kernel.org; linux-kernel@...r.kernel.org
> Subject: Re: [PATCH v2] cpufreq: amd-pstate: fix kernel hang issue while
> amd-pstate unregistering
>
> On Tue, Jan 10, 2023 at 1:50 PM Perry Yuan <perry.yuan@....com> wrote:
> >
> > In the amd_pstate_adjust_perf(), there is one cpufreq_cpu_get() call
> > to increase increments the kobject reference count of policy and make
> > it as busy. Therefore, a corresponding call to cpufreq_cpu_put() is
> > needed to decrement the kobject reference count back, it will resolve
> > the kernel hang issue when unregistering the amd-pstate driver and
> > register the `amd_pstate_epp` driver instance.
> >
> > Acked-by: Huang Rui <ray.huang@....com>
> > Reviewed-by: Mario Limonciello <mario.limonciello@....com>
> > Signed-off-by: Perry Yuan <perry.yuan@....com>
> > Tested-by: Wyes Karny <wyes.karny@....com>
> > Cc: stable@...r.kernel.org
>
> Can you provide a Fixes tag, please?
Sure, let me add the Fixes tag in v3
>
> Also, what's the difference between this and the previous version?
Just add the "Tested-by: Wyes Karny <wyes.karny@....com>" in v2.
>
> > ---
> > drivers/cpufreq/amd-pstate.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/cpufreq/amd-pstate.c
> > b/drivers/cpufreq/amd-pstate.c index 204e39006dda..c17bd845f5fc 100644
> > --- a/drivers/cpufreq/amd-pstate.c
> > +++ b/drivers/cpufreq/amd-pstate.c
> > @@ -307,6 +307,7 @@ static void amd_pstate_adjust_perf(unsigned int
> cpu,
> > max_perf = min_perf;
> >
> > amd_pstate_update(cpudata, min_perf, des_perf, max_perf,
> > true);
> > + cpufreq_cpu_put(policy);
> > }
> >
> > static int amd_get_min_freq(struct amd_cpudata *cpudata)
> > --
> > 2.34.1
> >
Powered by blists - more mailing lists