lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFnufp3u66k5ucSRxxYwrcsPcJOGP25oxCfWFsrVRouQmDNyjA@mail.gmail.com>
Date:   Wed, 23 Dec 2020 19:59:13 +0100
From:   Matteo Croce <mcroce@...ux.microsoft.com>
To:     "Theodore Y. Ts'o" <tytso@....edu>
Cc:     Ext4 <linux-ext4@...r.kernel.org>
Subject: Re: discard and data=writeback

On Wed, Dec 23, 2020 at 7:12 PM Theodore Y. Ts'o <tytso@....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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ