Re: [PATCHv2] thp: keep huge zero page pinned until tlb flush

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

 



On Tue, Apr 05, 2016 at 01:12:34PM +0300, Kirill A. Shutemov wrote:
> Andrea has found[1] a race condition on MMU-gather based TLB flush vs
> split_huge_page() or shrinker which frees huge zero under us (patch 1/2
> and 2/2 respectively).
> 
> With new THP refcounting, we don't need patch 1/2: mmu_gather keeps the
> page pinned until flush is complete and the pin prevents the page from
> being split under us.
> 
> We still need patch 2/2. This is simplified version of Andrea's patch.
> We don't need fancy encoding.
> 
> [1] http://lkml.kernel.org/r/1447938052-22165-1-git-send-email-aarcange@xxxxxxxxxx
> 
> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx>
> Reported-by: Andrea Arcangeli <aarcange@xxxxxxxxxx>
> ---
>  v2:
>    - fix build for !THP;
>    - typos;
> ---
>  include/linux/huge_mm.h | 5 +++++
>  mm/huge_memory.c        | 6 +++---
>  mm/swap.c               | 5 +++++
>  3 files changed, 13 insertions(+), 3 deletions(-)

Reviewed-by: Andrea Arcangeli <aarcange@xxxxxxxxxx>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]