lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 16 Oct 2023 23:55:21 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     srinivas pandruvada <srinivas.pandruvada@...ux.intel.com>
Cc:     "Wysocki, Rafael J" <rafael.j.wysocki@...el.com>,
        "Meng, Li (Jassmine)" <Li.Meng@....com>,
        "Huang, Ray" <Ray.Huang@....com>,
        "linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "x86@...nel.org" <x86@...nel.org>,
        "linux-acpi@...r.kernel.org" <linux-acpi@...r.kernel.org>,
        Shuah Khan <skhan@...uxfoundation.org>,
        "linux-kselftest@...r.kernel.org" <linux-kselftest@...r.kernel.org>,
        "Fontenot, Nathan" <Nathan.Fontenot@....com>,
        "Sharma, Deepak" <Deepak.Sharma@....com>,
        "Deucher, Alexander" <Alexander.Deucher@....com>,
        "Limonciello, Mario" <Mario.Limonciello@....com>,
        "Huang, Shimmer" <Shimmer.Huang@....com>,
        "Yuan, Perry" <Perry.Yuan@....com>,
        "Du, Xiaojian" <Xiaojian.Du@....com>,
        Viresh Kumar <viresh.kumar@...aro.org>,
        Borislav Petkov <bp@...en8.de>,
        Oleksandr Natalenko <oleksandr@...alenko.name>,
        "Karny, Wyes" <Wyes.Karny@....com>
Subject: Re: [RESEND PATCH V9 3/7] cpufreq: amd-pstate: Enable amd-pstate
 preferred core supporting.

On Mon, Oct 16, 2023 at 11:50:34AM -0700, srinivas pandruvada wrote:

I'll respond to the rest tomorrow, it's far too late.

> > > Also, same question as to the amd folks; what serializes those
> > > static
> > > variables?
> > 
> > That's a good one.
> 
> This function which is checking static variables is called from cpufreq
> ->init callback. Which in turn is called from a function which is
> passed as startup() function pointer to
> cpuhp_setup_state_nocalls_cpuslocked().
> 
> I see that startup() callbacks are called under a mutex
> cpuhp_state_mutex for each present CPUs. So if some tear down happen,
> that is also protected by the same mutex. The assumption is here is
> that cpuhp_invoke_callback() in hotplug state machine is not called in
> parallel on two CPUs by the hotplug state machine. But I see activity
> on parallel bringup, so this is questionable now.

Parallel bringup should still serialise this. It mostly only does the
hardware bringup in parallel.

Having a pointer back to the cpu hotplug lock would make it easier to
untangle this code though.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ