[PATCH 2/2] powerpc,kexec: Speedup kexec hpte tear down
Michael Ellerman
michael at ellerman.id.au
Tue May 11 03:04:23 EDT 2010
On Tue, 2010-05-11 at 16:28 +1000, Michael Neuling wrote:
> Currently for kexec the PTE tear down on 1TB segment systems normally
> requires 3 hcalls for each PTE removal. On a machine with 32GB of
> memory it can take around a minute to remove all the PTEs.
>
..
> - /* TODO: Use bulk call */
...
> + /* Read in batches of 4,
> + * invalidate only valid entries not in the VRMA
> + * hpte_count will be a multiple of 4
> + */
> + for (i = 0; i < hpte_count; i += 4) {
> + lpar_rc = plpar_pte_read_4_raw(0, i, (void *)ptes);
> + if (lpar_rc != H_SUCCESS)
> + continue;
> + for (j = 0; j < 4; j++){
> + if ((ptes[j].pteh & HPTE_V_VRMA_MASK) ==
> + HPTE_V_VRMA_MASK)
> + continue;
> + if (ptes[j].pteh & HPTE_V_VALID)
> + plpar_pte_remove_raw(0, i + j, 0,
> + &(ptes[j].pteh), &(ptes[j].ptel));
> }
Have you tried using the bulk remove call, if none of the HPTEs are for
the VRMA? Rumour was it was slower/the-same, but that may have been
apocryphal.
cheers
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/kexec/attachments/20100511/8fc75a3b/attachment.sig>
More information about the kexec
mailing list