OpenCloudOS-Kernel/fs/overlayfs
Jeffle Xu 654255fa20 ovl: inherit SB_NOSEC flag from upperdir
Since the stacking of regular file operations [1], the overlayfs edition of
write_iter() is called when writing regular files.

Since then, xattr lookup is needed on every write since file_remove_privs()
is called from ovl_write_iter(), which would become the performance
bottleneck when writing small chunks of data. In my test case,
file_remove_privs() would consume ~15% CPU when running fstime of unixbench
(the workload is repeadly writing 1 KB to the same file) [2].

Inherit the SB_NOSEC flag from upperdir. Since then xattr lookup would be
done only once on the first write. Unixbench fstime gets a ~20% performance
gain with this patch.

[1] https://lore.kernel.org/lkml/20180606150905.GC9426@magnolia/T/
[2] https://www.spinics.net/lists/linux-unionfs/msg07153.html

Signed-off-by: Jeffle Xu <jefflexu@linux.alibaba.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
2020-05-13 11:11:24 +02:00
..
Kconfig ovl: fix some xino configurations 2020-03-13 15:53:06 +01:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
copy_up.c ovl: prepare to copy up without workdir 2020-05-13 11:11:24 +02:00
dir.c ovl: fix WARN_ON nlink drop to zero 2020-03-27 16:51:02 +01:00
export.c ovl: potential crash in ovl_fid_to_fh() 2020-05-13 11:10:57 +02:00
file.c ovl: fix lockdep warning for async write 2020-03-13 15:53:06 +01:00
inode.c ovl: clear ATTR_OPEN from attr->ia_valid 2020-04-30 11:52:07 +02:00
namei.c ovl: cleanup non-empty directories in ovl_indexdir_cleanup() 2020-05-13 11:11:24 +02:00
overlayfs.h ovl: cleanup non-empty directories in ovl_indexdir_cleanup() 2020-05-13 11:11:24 +02:00
ovl_entry.h ovl: use a private non-persistent ino pool 2020-03-27 16:51:02 +01:00
readdir.c ovl: cleanup non-empty directories in ovl_indexdir_cleanup() 2020-05-13 11:11:24 +02:00
super.c ovl: inherit SB_NOSEC flag from upperdir 2020-05-13 11:11:24 +02:00
util.c ovl: allow remote upper 2020-03-17 15:04:22 +01:00