linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Paul Richards <paul.richards@gmail.com>
To: linux-lvm@redhat.com
Subject: [linux-lvm] lvmcache writeback mode and small writes
Date: Thu, 4 Jul 2019 09:09:47 +0100	[thread overview]
Message-ID: <CAMosweiEy7RY1URiBdxN-TxGrE+D1mBrqBev8y7PUbr1dkKekA@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 755 bytes --]

Hello there,
I have a question about the behavior of lvmcache with respect to writes
that are smaller than the cache chunk size into chunks that are not
currently cached.

Given an lvmcache using writeback mode, 128KiB chunksize, and nothing
currently cached.

When an application does a 4KiB write followed by an fsync, what
reads/writes occur within lvmcache before the fsync is acknowledged?


Is it roughly:

1. The 128KiB cold chunk is read from the origin LV.
2. The 4KiB write is made into this chunk, and written to the cache LV.
3. Fsync acknowledged.

Or, does lvmcache avoid the read of the origin LV (step 1) by buffering the
smaller-than-chunksize write in the cache LV somewhere?  Perhaps in some
sort of dedicated journal for small writes.

[-- Attachment #2: Type: text/html, Size: 2168 bytes --]

                 reply	other threads:[~2019-07-04  8:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=CAMosweiEy7RY1URiBdxN-TxGrE+D1mBrqBev8y7PUbr1dkKekA@mail.gmail.com \
    --to=paul.richards@gmail.com \
    --cc=linux-lvm@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;
as well as URLs for NNTP newsgroup(s).