public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: linux-kernel@vger.kernel.org, Hugh Dickins <hughd@google.com>,
	Chris Friesen <chris.friesen@genband.com>
Subject: Re: [PATCH v2 1/2] msync: support syncing a small part of the file
Date: Fri, 22 Jun 2012 14:12:53 -0700	[thread overview]
Message-ID: <20120622141253.1e9747cf.akpm@linux-foundation.org> (raw)
In-Reply-To: <1339773179-31210-2-git-send-email-pbonzini@redhat.com>

On Fri, 15 Jun 2012 17:12:58 +0200
Paolo Bonzini <pbonzini@redhat.com> wrote:

> msync does not need to flush changes to the entire file, even with MS_SYNC.
> Instead, it can use vfs_fsync_range to only synchronize a part of the file.
> This is part of the specification; expecting msync to synchronize all the
> file would take a very creative interpretation of the manual page as well
> as the specification.
> 
> In addition, not all metadata has to be synced; msync is closer to
> fdatasync than it is to fsync.  So, pass 1 to vfs_fsync_range.

I renamed the patch to "msync: switch to syncing only the affected part
of the file" to emphasise that there is a behavioural change here.

Then I deleted the patch.

Please recall my thus-far-utterly-and-irritatingly-ignored comments
about nonlinear mappings.  Presently an msync() on a nonlinear mapping
will work correctly, because we sync the whole file, yes?  And with
this change, we will no longer sync all the pages which were covered by
the affected memory range.  Thus breaking the syscall?

  reply	other threads:[~2012-06-22 21:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-15 15:12 [PATCH v2 0/2] msync improvements Paolo Bonzini
2012-06-15 15:12 ` [PATCH v2 1/2] msync: support syncing a small part of the file Paolo Bonzini
2012-06-22 21:12   ` Andrew Morton [this message]
2012-07-02  8:14     ` Paolo Bonzini
2012-06-15 15:12 ` [PATCH v2 2/2] msync: start async writeout when MS_ASYNC Paolo Bonzini
2012-06-22 21:26   ` Andrew Morton
2012-07-02  8:15     ` Paolo Bonzini

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=20120622141253.1e9747cf.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=chris.friesen@genband.com \
    --cc=hughd@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    /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