• Andrey Vagin's avatar
    page-pipe: split dumping memory on chunks (v3) · bb98a820
    Andrey Vagin authored
    The problem is that vmsplice() to a big pipe fails very often.
    
    The kernel allocates a linear chunk of memory for pipe buffer
    descriptos, but a big allocation in kernel can fail.
    
    So we need to restrict maximal capacity of pipes. But the number of
    pipes is restricted too, so we need to split dumping memory on chunks.
    
    In this patch we calculates the pipe size for which vmsplice() will not
    fail.
    
    v2: s/batch/chunk and a few other small fixes
    v3: Remove callbacks from page_pipes and reuse pipes
    Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
    Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
    bb98a820
page-pipe.h 3.18 KB