diff options
author | Maxim Patlasov <mpatlasov@virtuozzo.com> | 2019-09-19 17:11:20 +0300 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2020-05-19 15:50:38 +0300 |
commit | 6b2fb79963fbed7db3ef850926d913518fd5c62f (patch) | |
tree | 379139516580e670f47f6d1eea3843e87a4be091 /fs/fuse/fuse_i.h | |
parent | 5ddd9ced9aef6cfa76af27d384c17c9e2d610ce8 (diff) | |
download | linux-6b2fb79963fbed7db3ef850926d913518fd5c62f.tar.xz |
fuse: optimize writepages search
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: Maxim Patlasov <mpatlasov@virtuozzo.com>
Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/fuse/fuse_i.h')
-rw-r--r-- | fs/fuse/fuse_i.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h index d7cde216fc87..740a8a7d7ae6 100644 --- a/fs/fuse/fuse_i.h +++ b/fs/fuse/fuse_i.h @@ -111,7 +111,7 @@ struct fuse_inode { wait_queue_head_t page_waitq; /* List of writepage requestst (pending or sent) */ - struct list_head writepages; + struct rb_root writepages; }; /* readdir cache (directory only) */ |