Skip to contentSkip to conversation

performance degradation due to extra fuse_update_attributes() call in fuse_file_aio_write()

DISCUSSION Vasily Averin 1 participant 1 message Nov 5, 2019 VFS

lore
Share & tools
lore
#0 lore raw

Dear Miklos,

could you please elaborate the reason of fuse_update_attributes() call in fuse_file_aio_write() ?

After rebase of openVz7 kernel to RHEL7.7 we have found significant performance degradation:
from 136 kiops to 75 kiops during first 10 second and down to 25 kiops later.

The reason of this was an extra fuse_update_attributes() call in fuse_file_aio_write().

Our old code was an equivalent of v6 patch version submitted by Maxim Patlasov
https://lkml.org/lkml/2013/10/10/281
fuse_file_aio_write():

       if (get_fuse_conn(inode)->writeback_cache)
               return generic_file_aio_write(iocb, iov, nr_segs, pos);

However in final commit 4d99ff8f12eb "fuse: Turn writeback cache on" you have included an additional fuse_update_attributes() call

fuse_file_aio_write():

       if (get_fuse_conn(inode)->writeback_cache) {
               /* Update size (EOF optimization) and mode (SUID clearing) */
               err = fuse_update_attributes(mapping->host, NULL, file, NULL);
               if (err)
                       return err;

               return generic_file_aio_write(iocb, iov, nr_segs, pos);
       }

Unfortunately we did not found any description related to this change.

Could you please elaborate which kind of the problem you have noticed in v6 patch version and explain how fuse_update_attributes() call fixes it?

Thank you,
Vasily Averin