[lkml]   [2019]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] 9p: avoid attaching writeback_fid on mmap with type PRIVATE
On Tue, 2019-08-20 at 13:49 +0200, Dominique Martinet wrote:
> Chengguang Xu wrote on Tue, Aug 20, 2019:
> > Currently on mmap cache policy, we always attach writeback_fid
> > whether mmap type is SHARED or PRIVATE. However, in the use case
> > of kata-container which combines 9p(Guest OS) with overlayfs(Host OS),
> > this behavior will trigger overlayfs' copy-up when excute command
> > inside container.
> hmm, I guess this just works for non-ovl cases because sync_inode()
> realizes there is nothing to sync, but the fsync at the end still
> triggers the copy-up ?
> Well, I guess there really is no need to flush for private mappings,
> so might as well go for this; sparing an extra useless clone walk cannot
> hurt.

Unfortunately, overlayfs does copy-up at open operation if the open flags
indicate data/meta modification, so as long as we attach writeback_fid with
O_RDWR on private mmap there are a lot of unnecessary copy-up of binary and
shared library files on backedn overlayfs when executing command inside kata
containers. After this patch we found there are no useless copy-up files anymore
and also private/shared mmap worked as expected.


> I'll queue this up after tests, no promise on delay sorry :/

 \ /
  Last update: 2019-08-21 03:49    [W:0.064 / U:0.688 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site