linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: Allison Collins <allison.henderson@oracle.com>,
	lsf-pc@lists.linux-foundation.org,
	xfs <linux-xfs@vger.kernel.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [Lsf-pc] [LSF/MM/BPF TOPIC] Atomic Writes
Date: Sat, 15 Feb 2020 11:53:07 -0800	[thread overview]
Message-ID: <20200215195307.GI7778@bombadil.infradead.org> (raw)
In-Reply-To: <20200214044242.GI6870@magnolia>

On Thu, Feb 13, 2020 at 08:42:42PM -0800, Darrick J. Wong wrote:
> On Thu, Feb 13, 2020 at 03:33:08PM -0700, Allison Collins wrote:
> > I also understand there are multiple ways to solve this problem that people
> > may have opinions on.  I've noticed some older patch sets trying to use a
> > flag to control when dirty pages are flushed, though I think our customer
> > would like to see a hardware solution via NVMe devices.  So I would like to
> > see if others have similar interests as well and what their thoughts may be.
> > Thanks everyone!
> 
> Hmmm well there are a number of different ways one could do this--

Interesting.  Your answer implies a question of "How do we expose
a filesystem's ability to do atomic writes to userspace", whereas I
thought Allison's question was "What spec do we write to give to the
NVMe vendors so that filesystems can optimise their atomic writes".

I am very interested in the question of atomic writes, but I don't
know that we're going to have the right people in the room to design
a userspace API.  Maybe this is more of a Plumbers topic?  I think
the two main users of a userspace API would be databases (sqlite,
mysql, postgres, others) and package managers (dpkg, rpm, others?).
Then there would be the miscellaneous users who just want things to work
and don't really care about performance (writing a game's high score file,
updating /etc/sudoers).

That might argue in favour of having two independent APIs, one that's
simple, probably quite slow, but safe, and one that's complex, fast
and safe.  There's also an option for simple, fast and unsafe, but,
y'know, we already have that ...

Your response also implies that atomic writes are only done to a single
file at a time, which isn't true for either databases or for package
managers.  I wonder if the snapshot/reflink paradigm is the right one
for multi-file atomic updates, or if we can use the same underlying
mechanism to implement an API which better fits how userspace actually
wants to do atomic updates.


  reply	other threads:[~2020-02-15 19:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-13 22:33 [Lsf-pc] [LSF/MM/BPF TOPIC] Atomic Writes Allison Collins
2020-02-14  4:42 ` Darrick J. Wong
2020-02-15 19:53   ` Matthew Wilcox [this message]
2020-02-16 21:41     ` Dave Chinner
2020-02-20 21:30   ` Steve French

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=20200215195307.GI7778@bombadil.infradead.org \
    --to=willy@infradead.org \
    --cc=allison.henderson@oracle.com \
    --cc=darrick.wong@oracle.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=lsf-pc@lists.linux-foundation.org \
    /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;
as well as URLs for NNTP newsgroup(s).