[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <877dxyfrpz.fsf@mpe.ellerman.id.au>
Date: Wed, 29 Apr 2020 21:37:12 +1000
From: Michael Ellerman <mpe@...erman.id.au>
To: Kajol Jain <kjain@...ux.ibm.com>, acme@...nel.org,
linuxppc-dev@...ts.ozlabs.org, sukadev@...ux.vnet.ibm.com
Cc: linux-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org,
anju@...ux.vnet.ibm.com, maddy@...ux.vnet.ibm.com,
ravi.bangoria@...ux.ibm.com, peterz@...radead.org,
yao.jin@...ux.intel.com, ak@...ux.intel.com, jolsa@...nel.org,
kan.liang@...ux.intel.com, jmario@...hat.com,
alexander.shishkin@...ux.intel.com, mingo@...nel.org,
paulus@...abs.org, namhyung@...nel.org, mpetlan@...hat.com,
gregkh@...uxfoundation.org, benh@...nel.crashing.org,
mamatha4@...ux.vnet.ibm.com, mark.rutland@....com,
tglx@...utronix.de, kjain@...ux.ibm.com
Subject: Re: [PATCH v7 5/5] powerpc/hv-24x7: Update post_mobility_fixup() to handle migration
Kajol Jain <kjain@...ux.ibm.com> writes:
> Function 'read_sys_info_pseries()' is added to get system parameter
> values like number of sockets and chips per socket.
> and it gets these details via rtas_call with token
> "PROCESSOR_MODULE_INFO".
>
> Incase lpar migrate from one system to another, system
> parameter details like chips per sockets or number of sockets might
> change. So, it needs to be re-initialized otherwise, these values
> corresponds to previous system values.
> This patch adds a call to 'read_sys_info_pseries()' from
> 'post-mobility_fixup()' to re-init the physsockets and physchips values.
>
> Signed-off-by: Kajol Jain <kjain@...ux.ibm.com>
> ---
> arch/powerpc/platforms/pseries/mobility.c | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/arch/powerpc/platforms/pseries/mobility.c b/arch/powerpc/platforms/pseries/mobility.c
> index b571285f6c14..226accd6218b 100644
> --- a/arch/powerpc/platforms/pseries/mobility.c
> +++ b/arch/powerpc/platforms/pseries/mobility.c
> @@ -371,6 +371,18 @@ void post_mobility_fixup(void)
> /* Possibly switch to a new RFI flush type */
> pseries_setup_rfi_flush();
>
> + /*
> + * Incase lpar migrate from one system to another, system
In case an LPAR migrates
> + * parameter details like chips per sockets and number of sockets
> + * might change. So, it needs to be re-initialized otherwise these
^ ^
they need the
> + * values corresponds to previous system.
^
will correspond to the
> + * Here, adding a call to read_sys_info_pseries() declared in
Adding is the wrong tense in a comment. When someone reads the comment
the code has already been added. Past tense would be right, but really
the comment shouldn't say what you did, it should say why.
> + * platforms/pseries/pseries.h to re-init the physsockets and
> + * physchips value.
Call read_sys_info_pseries() to reinitialise the values.
> + */
> + if (IS_ENABLED(CONFIG_HV_PERF_CTRS) && IS_ENABLED(CONFIG_PPC_RTAS))
> + read_sys_info_pseries();
The RTAS check is not needed. pseries always selects RTAS.
You shouldn't need the IS_ENABLED() check here though, do it with an
empty version in the header when CONFIG_HV_PERF_CTRS is not enabled.
cheers
Powered by blists - more mailing lists