From: "cgxu519@zoho.com.cn" <cgxu519@zoho.com.cn>
To: Dominique Martinet <asmadeus@codewreck.org>
Cc: ericvh@gmail.com, lucho@ionkov.net,
v9fs-developer@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] 9p: avoid attaching writeback_fid on mmap with type PRIVATE
Date: Wed, 21 Aug 2019 09:33:09 +0800 [thread overview]
Message-ID: <9afcec4d3987296ed4823d024c5a6fc54f741364.camel@zoho.com.cn> (raw)
In-Reply-To: <20190820114927.GA12715@nautica>
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.
Thanks,
Chengguang.
>
> I'll queue this up after tests, no promise on delay sorry :/
prev parent reply other threads:[~2019-08-21 1:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-20 10:03 Chengguang Xu
2019-08-20 11:49 ` Dominique Martinet
2019-08-21 1:33 ` cgxu519 [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9afcec4d3987296ed4823d024c5a6fc54f741364.camel@zoho.com.cn \
--to=cgxu519@zoho.com.cn \
--cc=asmadeus@codewreck.org \
--cc=ericvh@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lucho@ionkov.net \
--cc=v9fs-developer@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®