• Andrew Morton's avatar
    [PATCH] Fix futexes in huge pages · f93fcfa9
    Andrew Morton authored
    Using a futex in a large page causes a kernel lockup in __pin_page() -
    because __pin_page's page revalidation uses follow_page(), and follow_page()
    doesn't work for hugepages.
    
    The patch fixes up follow_page() to return the appropriate 4k page for
    hugepages.
    
    This incurs a vma lookup for each follow_page(), which is considerable
    overhead in some situations.  We only _need_ to do this if the architecture
    cannot determin a page's hugeness from the contents of the PMD.
    
    So this patch is a "reference" implementation for, say, PPC BAT-based
    hugepages.
    f93fcfa9
mmap.c 35.5 KB