linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matteo Croce <mcroce@linux.microsoft.com>
To: "Theodore Y. Ts'o" <tytso@mit.edu>
Cc: Ext4 <linux-ext4@vger.kernel.org>
Subject: Re: discard and data=writeback
Date: Wed, 23 Dec 2020 19:59:13 +0100	[thread overview]
Message-ID: <CAFnufp3u66k5ucSRxxYwrcsPcJOGP25oxCfWFsrVRouQmDNyjA@mail.gmail.com> (raw)
In-Reply-To: <X+OIiNOGKmbwITC3@mit.edu>

On Wed, Dec 23, 2020 at 7:12 PM Theodore Y. Ts'o <tytso@mit.edu> wrote:
>
> On Wed, Dec 23, 2020 at 01:47:33AM +0100, Matteo Croce wrote:
> > As an extra test I extracted the archive with data=ordered, remounted
> > with data=writeback and timed the rm -rf and viceversa.
> > The mount option is the one that counts, the one using during
> > extraction doesn't matter.
>
> Hmm... that's really surprising.  At this point, the only thing I can
> suggest is to try using blktrace to see what's going on at the block
> layer when the I/O's and discard requests are being submitted.  If
> there are no dirty blocks in the page cache, I don't see how
> data=ordered vs data=writeback would make a difference to how mount -o
> discard processing would take place.
>

Hi,

these are the blktrace outputs for both journaling modes:

# dmesg |grep EXT4-fs |tail -1
[ 1594.829833] EXT4-fs (nvme0n1p1): mounted filesystem with ordered
data mode. Opts: data=ordered,discard
# blktrace /dev/nvme0n1 & sleep 1 ; time rm -rf /media/linux-5.10/ ; kill $!
[1] 3032

real    0m1.328s
user    0m0.063s
sys     0m1.231s
# === nvme0n1 ===
  CPU  0:                    0 events,        0 KiB data
  CPU  1:                    0 events,        0 KiB data
  CPU  2:                    0 events,        0 KiB data
  CPU  3:                 1461 events,       69 KiB data
  CPU  4:                    1 events,        1 KiB data
  CPU  5:                    0 events,        0 KiB data
  CPU  6:                    0 events,        0 KiB data
  CPU  7:                    0 events,        0 KiB data
  Total:                  1462 events (dropped 0),       69 KiB data


# dmesg |grep EXT4-fs |tail -1
[ 1734.837651] EXT4-fs (nvme0n1p1): mounted filesystem with writeback
data mode. Opts: data=writeback,discard
# blktrace /dev/nvme0n1 & sleep 1 ; time rm -rf /media/linux-5.10/ ; kill $!
[1] 3069

real    1m30.273s
user    0m0.139s
sys     0m3.084s
# === nvme0n1 ===
  CPU  0:               133830 events,     6274 KiB data
  CPU  1:                21878 events,     1026 KiB data
  CPU  2:                46365 events,     2174 KiB data
  CPU  3:                98116 events,     4600 KiB data
  CPU  4:               290902 events,    13637 KiB data
  CPU  5:                10926 events,      513 KiB data
  CPU  6:                76861 events,     3603 KiB data
  CPU  7:                17855 events,      837 KiB data
  Total:                696733 events (dropped 0),    32660 KiB data

Cheers,
-- 
per aspera ad upstream

  reply	other threads:[~2020-12-23 19:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-18 18:40 discard and data=writeback Matteo Croce
2020-12-21  3:04 ` Theodore Y. Ts'o
2020-12-22 14:59   ` Matteo Croce
2020-12-22 16:34     ` Theodore Y. Ts'o
2020-12-22 22:53       ` Andreas Dilger
2020-12-23  1:25         ` Matteo Croce
2020-12-23  0:47       ` Matteo Croce
2020-12-23 18:12         ` Theodore Y. Ts'o
2020-12-23 18:59           ` Matteo Croce [this message]
2020-12-24  3:16             ` Theodore Y. Ts'o
2020-12-24 10:53               ` Matteo Croce
     [not found] <CGME20201229054143epcms2p15ae3cce43bb3c503adf94528f354ba78@epcms2p1>
2020-12-29  5:41 ` Daejun Park
2020-12-29 13:42   ` Matteo Croce

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=CAFnufp3u66k5ucSRxxYwrcsPcJOGP25oxCfWFsrVRouQmDNyjA@mail.gmail.com \
    --to=mcroce@linux.microsoft.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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).