[PATCH v2 2/2] powerpc: Copy only required pieces of the mm_context_t to the paca

Michael Ellerman mpe at ellerman.id.au
Thu Dec 10 21:00:23 AEDT 2015


On Thu, 2015-12-10 at 14:46 +1100, Michael Neuling wrote:

> Currently we copy the whole mm_context_t to the paca but only access a
> few bits of it.  This is wasteful of space paca and also takes quite
> some time in the hot path of context switching.
> 
> diff --git a/arch/powerpc/include/asm/paca.h
> b/arch/powerpc/include/asm/paca.h
> index 1cc6e08..06cdaee 100644
> --- a/arch/powerpc/include/asm/paca.h
> +++ b/arch/powerpc/include/asm/paca.h
> @@ -199,7 +206,14 @@ struct paca_struct {
>  #ifdef CONFIG_PPC_BOOK3S
>  static inline void copy_mm_to_paca(mm_context_t *context)
>  {
> -	get_paca()->context = *context;
> +	get_paca()->context_id = context->id;
> +#ifdef CONFIG_PPC_MM_SLICES
> +	get_paca()->context_low_slices_psize = context
> ->low_slices_psize;

Patch is wrapped ^

And so on.

cheers



More information about the Linuxppc-dev mailing list