On 01/29/2016 10:54 AM, David Gibson wrote:

> +
> +static int pseries_lpar_resize_hpt_commit(void *data)
> +{
> +     struct hpt_resize_state *state = data;
> +
> +     state->commit_rc = plpar_resize_hpt_commit(0, state->shift);
> +     if (state->commit_rc != H_SUCCESS)
> +             return -EIO;
> +
> +     /* Hypervisor has transitioned the HTAB, update our globals */
> +     ppc64_pft_size = state->shift;
> +     htab_size_bytes = 1UL << ppc64_pft_size;
> +     htab_hash_mask = (htab_size_bytes >> 7) - 1;
> +
> +     return 0;
> +}
> +

snip

> +/* Must be called in user context */
> +static int pseries_lpar_resize_hpt(unsigned long shift)
> +{
> +     struct hpt_resize_state state = {
> +             .shift = shift,
> +             .commit_rc = H_FUNCTION,

> +
> +     rc = stop_machine(pseries_lpar_resize_hpt_commit, &state, NULL);

With my limited knowledge of stop_machine, wondering if the current
or any future version of 'pseries_lpar_resize_hpt_commit' function
can cause HPT change (page fault path) while stop is executing it.

_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to