Re: [PATCH kvm-unit-tests 16/18] arm: only align CPU stacks to one page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 24, 2017 at 05:21:43PM +0200, Paolo Bonzini wrote:
> vmalloc is not able to provide allocations with alignment greater than
> PAGE_SIZE, so avoid them.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>
> ---
>  lib/arm/asm/thread_info.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/arm/asm/thread_info.h b/lib/arm/asm/thread_info.h
> index 9f0c14d..c2ecebb 100644
> --- a/lib/arm/asm/thread_info.h
> +++ b/lib/arm/asm/thread_info.h
> @@ -38,7 +38,7 @@
>  
>  static inline void *thread_stack_alloc(void)
>  {
> -	void *sp = memalign(THREAD_SIZE, THREAD_SIZE);
> +	void *sp = memalign(PAGE_SIZE, THREAD_SIZE);
>  	return sp + THREAD_START_SP;
>  }
>

This reduces all the secondary cpu's stacks on arm from 16K to 4K.
Also, THREAD_SIZE is page aligned, so I'm wondering what's breaking
here?

Thanks,
drew



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux