• Pavel Emelyanov's avatar
    proc: Don't use FILE* for reading personality · f3bee6d5
    Pavel Emelyanov authored
    It turned out, that fdopen (used in fopen_proc) always maps
    a 4k buffer for reads and this buffer gets unmap-ed later
    on fclose.
    
    Taking into account the amount of proc files we read (~20
    per task plus one file per opened file descriptor) this
    mmap+munmap result in quite a lot of useless CPU time.
    
    E.g. for a container of 20 tasks we have 1000 calls taking
    ~8% of total dump time.
    
    So lets first stop doing this for simple cases -- one line
    proc files.
    Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
    f3bee6d5
cr-dump.c 39.3 KB