• Hugh Dickins's avatar
    [PATCH] vmtrunc: restore unmap_vmas zap_bytes · 84c496cf
    Hugh Dickins authored
    The low-latency unmap_vmas patch silently moved the zap_bytes test after the
    TLB finish and lockbreak and regather: why?  That not only makes zap_bytes
    redundant (might as well use ZAP_BLOCK_SIZE), it makes the unmap_vmas level
    redundant too - it's all about saving TLB flushes when unmapping a series of
    small vmas.
    
    Move zap_bytes test back before the lockbreak, and delete the curious comment
    that a small zap block size doesn't matter: it's true need_flush prevents TLB
    flush when no page has been unmapped, but unmapping pages in small blocks
    involves many more TLB flushes than in large blocks.
    Signed-off-by: default avatarHugh Dickins <hugh@veritas.com>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    84c496cf
memory.c 54.2 KB