Re: [RFC][PATCH] ovl: lazy copy up of data on first write

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 18, 2019 at 8:34 PM Vivek Goyal <vgoyal@xxxxxxxxxx> wrote:
>
> On Fri, Jan 18, 2019 at 05:33:36PM +0200, Amir Goldstein wrote:
> > On Fri, Jan 18, 2019 at 4:43 PM Vivek Goyal <vgoyal@xxxxxxxxxx> wrote:
> > >
> > > On Fri, Jan 18, 2019 at 03:45:19PM +0200, Amir Goldstein wrote:
> > > > When metacopy feature is enabled, copy up only metadata when
> > > > opening a file O_RDWR and defer copy up of data until the first
> > > > write operation.
> > > >
> > >
> > > Amir,
> > >
> > > What's the primary use case of lazy data copy up. Are there users who
> > > open file O_RDWR but never write to it.
> >
> > I don't know of all the cases, but AFAIK, MSOffice apps (over network share
> > and maybe also LibreOffice) open the document file O_RDWR just to check
> > if editing is allowed, but but they re-open the file read-only, because the
> > document file is never written to. A temp file is written and moved over it.
> > So copy up of an MSOffice document file data is never beneficial.
> >
> > > Or we want to transfer latency of copy up from open to write.
> >
> > Indeed. Chengguang reported that in their use case, the latency at open
> > time is an issue.
> >
> > >
> > > Should this behavior be an opt in with another mount option (and not
> > > be enabled automatically with metacopy=on).
> > >
> >
> > I can't think of one good reason for user to opt-in for copy up data on open.
> > Or on a use case where latency on open is desired over latency on write.
> > Can you?
>
> I can't. I am wondering why are we changing default. Why is it a better
> default to do copy up on first WRITE and not during open time. In his

Oh there are very good reasons to prefer latency on WRITE over latency
on open.

One reason is that traditionally, open is not an operation where long latency
are expected, so apps may behave badly with long latency on open.

Another reason, if application is latency sensitive, it can use aio,
but there is no async open, or is there??

> emails, Chengguang, just said their applications will benefit from it
> without giving further details. So if their application is not
> writing, they could easily solve this problem by opening file
> O_RDONLY as well?

My understanding is that latency on open() is an issue and latency on
first write is not an issue, which is something I am familiar with from
other apps, but I will let Chengguang elaborate.

Thanks,
Amir.



[Index of Archives]     [Linux Filesystems Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux