Thread (12 messages) 12 messages, 5 authors, 2020-03-16

Re: [PATCHv3 2/2] pseries/scm: buffer pmem's bound addr in dt for kexec kernel

From: Pingfan Liu <hidden>
Date: 2020-03-16 08:40:03

On Mon, Mar 16, 2020 at 10:53 AM Aneesh Kumar K.V
[off-list ref] wrote:
On 3/4/20 2:17 PM, Pingfan Liu wrote:
quoted
At present, plpar_hcall(H_SCM_BIND_MEM, ...) takes a very long time, so
if dumping to fsdax, it will take a very long time.

that should be fixed by

faa6d21153fd11e139dd880044521389b34a24f2
Author:       Aneesh Kumar K.V [off-list ref]
AuthorDate:   Tue Sep 3 18:04:52 2019 +0530
Commit:       Michael Ellerman [off-list ref]
CommitDate:   Wed Sep 25 08:32:59 2019 +1000

powerpc/nvdimm: use H_SCM_QUERY hcall on H_OVERLAP error

Right now we force an unbind of SCM memory at drcindex on H_OVERLAP error.
This really slows down operations like kexec where we get the H_OVERLAP
error because we don't go through a full hypervisor re init.

H_OVERLAP error for a H_SCM_BIND_MEM hcall indicates that SCM memory at
drc index is already bound. Since we don't specify a logical memory
address for bind hcall, we can use the H_SCM_QUERY hcall to query
the already bound logical address.
Good to know it.

Thanks,
Pingfan


quoted
Take a closer look, during the papr_scm initialization, the only
configuration is through drc_pmem_bind()-> plpar_hcall(H_SCM_BIND_MEM,
...), which helps to set up the bound address.

On pseries, for kexec -l/-p kernel, there is no reset of hardware, and this
step can be stepped around to save times.  So the pmem bound address can be
passed to the 2nd kernel through a dynamic added property "bound-addr" in
dt node 'ibm,pmemory'.
-aneesh
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help