• Maxim Patlasov's avatar
    fuse: optimize writepages search · 6b2fb799
    Maxim Patlasov authored
    Re-work fi->writepages, replacing list with rb-tree.  This improves
    performance because kernel fuse iterates through fi->writepages for each
    writeback page and typical number of entries is about 800 (for 100MB of
    fuse writeback).
    
    Before patch:
    
    10240+0 records in
    10240+0 records out
    10737418240 bytes (11 GB) copied, 41.3473 s, 260 MB/s
    
     2  1      0 57445400  40416 6323676    0    0    33 374743 8633 19210  1  8 88  3  0
    
      29.86%  [kernel]               [k] _raw_spin_lock
      26.62%  [fuse]                 [k] fuse_page_is_writeback
    
    After patch:
    
    10240+0 records in
    10240+0 records out
    10737418240 bytes (11 GB) copied, 21.4954 s, 500 MB/s
    
     2  9      0 53676040  31744 10265984    0    0    64 854790 10956 48387  1  6 88  6  0
    
      23.55%  [kernel]             [k] copy_user_enhanced_fast_string
       9.87%  [kernel]             [k] __memcpy
       3.10%  [kernel]             [k] _raw_spin_lock
    Signed-off-by: default avatarMaxim Patlasov <mpatlasov@virtuozzo.com>
    Signed-off-by: default avatarVasily Averin <vvs@virtuozzo.com>
    Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
    6b2fb799
fuse_i.h 26.1 KB