linux-unionfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH v4 0/9] implement containerized syncfs for overlayfs
@ 2020-11-13  6:55 Chengguang Xu
  2020-11-13  6:55 ` [RFC PATCH v4 1/9] ovl: setup overlayfs' private bdi Chengguang Xu
                   ` (9 more replies)
  0 siblings, 10 replies; 24+ messages in thread
From: Chengguang Xu @ 2020-11-13  6:55 UTC (permalink / raw)
  To: miklos, jack, amir73il; +Cc: linux-unionfs, linux-fsdevel, Chengguang Xu

Current syncfs(2) syscall on overlayfs just calls sync_filesystem()
on upper_sb to synchronize whole dirty inodes in upper filesystem
regardless of the overlay ownership of the inode. In the use case of
container, when multiple containers using the same underlying upper
filesystem, it has some shortcomings as below.

(1) Performance
Synchronization is probably heavy because it actually syncs unnecessary
inodes for target overlayfs.

(2) Interference
Unplanned synchronization will probably impact IO performance of
unrelated container processes on the other overlayfs.

This series try to implement containerized syncfs for overlayfs so that
only sync target dirty upper inodes which are belong to specific overlayfs
instance. By doing this, it is able to reduce cost of synchronization and
will not seriously impact IO performance of unrelated processes.

v1->v2:
- Mark overlayfs' inode dirty itself instead of adding notification
  mechanism to vfs inode.

v2->v3:
- Introduce overlayfs' extra syncfs wait list to wait target upper inodes
in ->sync_fs.

v3->v4:
- Using wait_sb_inodes() to wait syncing upper inodes.
- Mark overlay inode dirty only when having upper inode and  VM_SHARED
flag in ovl_mmap().
- Check upper i_state after checking upper mmap state
in ovl_write_inode.

Chengguang Xu (9):
  ovl: setup overlayfs' private bdi
  ovl: implement ->writepages operation
  ovl: implement overlayfs' ->evict_inode operation
  ovl: mark overlayfs' inode dirty on modification
  ovl: mark overlayfs' inode dirty on shared mmap
  ovl: implement overlayfs' ->write_inode operation
  ovl: cache dirty overlayfs' inode
  fs: export wait_sb_inodes()
  ovl: implement containerized syncfs for overlayfs

 fs/fs-writeback.c         |  3 +-
 fs/overlayfs/file.c       |  3 ++
 fs/overlayfs/inode.c      | 15 ++++++++++
 fs/overlayfs/overlayfs.h  |  4 +++
 fs/overlayfs/super.c      | 63 ++++++++++++++++++++++++++++++++++++---
 fs/overlayfs/util.c       | 14 +++++++++
 include/linux/writeback.h |  1 +
 7 files changed, 98 insertions(+), 5 deletions(-)

-- 
2.26.2



^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2021-04-14  6:14 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-13  6:55 [RFC PATCH v4 0/9] implement containerized syncfs for overlayfs Chengguang Xu
2020-11-13  6:55 ` [RFC PATCH v4 1/9] ovl: setup overlayfs' private bdi Chengguang Xu
2020-11-13  6:55 ` [RFC PATCH v4 2/9] ovl: implement ->writepages operation Chengguang Xu
2020-11-13  6:55 ` [RFC PATCH v4 3/9] ovl: implement overlayfs' ->evict_inode operation Chengguang Xu
2020-11-13  6:55 ` [RFC PATCH v4 4/9] ovl: mark overlayfs' inode dirty on modification Chengguang Xu
2021-04-09 13:45   ` Miklos Szeredi
2021-04-12 11:58     ` Chengguang Xu
2020-11-13  6:55 ` [RFC PATCH v4 5/9] ovl: mark overlayfs' inode dirty on shared mmap Chengguang Xu
2020-11-13  6:55 ` [RFC PATCH v4 6/9] ovl: implement overlayfs' ->write_inode operation Chengguang Xu
2021-04-09 13:49   ` Miklos Szeredi
2021-04-14  6:14     ` Chengguang Xu
2020-11-13  6:55 ` [RFC PATCH v4 7/9] ovl: cache dirty overlayfs' inode Chengguang Xu
2021-04-09 13:50   ` Miklos Szeredi
2021-04-13  2:14     ` Chengguang Xu
2021-04-13  8:43       ` Miklos Szeredi
2021-04-14  5:53         ` Chengguang Xu
2020-11-13  6:55 ` [RFC PATCH v4 8/9] fs: export wait_sb_inodes() Chengguang Xu
2020-11-13  6:55 ` [RFC PATCH v4 9/9] ovl: implement containerized syncfs for overlayfs Chengguang Xu
2021-04-09 13:51   ` Miklos Szeredi
2021-04-12 12:24     ` Chengguang Xu
2021-04-12 14:22       ` Miklos Szeredi
2020-12-04 14:49 ` 回复:[RFC PATCH v4 0/9] " Chengguang Xu
2020-12-04 15:02   ` [RFC " Miklos Szeredi
2020-12-04 16:40   ` 回复:[RFC " Jan Kara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).