From: Adam Borowski <kilobyte@angband.pl>
To: Wang Yugui <wangyugui@e16-tech.com>
Cc: Goffredo Baroncelli <kreijack@libero.it>,
linux-btrfs@vger.kernel.org, Michael <mclaud@roznica.com.ua>,
Hugo Mills <hugo@carfax.org.uk>,
Martin Svec <martin.svec@zoner.cz>,
Goffredo Baroncelli <kreijack@inwind.it>
Subject: Re: [PATCH] btrfs: add ssd_metadata mode
Date: Fri, 23 Oct 2020 12:11:45 +0200 [thread overview]
Message-ID: <20201023101145.GB19860@angband.pl> (raw)
In-Reply-To: <20201023152329.E7FF.409509F4@e16-tech.com>
On Fri, Oct 23, 2020 at 03:23:30PM +0800, Wang Yugui wrote:
> Hi, Goffredo Baroncelli
>
> We can move 'rotational of struct btrfs_device_info' to 'bool rotating
> of struct btrfs_device'.
>
> 1, it will be more close to 'bool rotating of struct btrfs_fs_devices'.
>
> 2, it maybe used to enhance the path of '[PATCH] btrfs: balance RAID1/RAID10 mirror selection'.
> https://lore.kernel.org/linux-btrfs/3bddd73e-cb60-b716-4e98-61ff24beb570@oracle.com/T/#t
I don't think it should be a bool -- or at least, turned into a bool
late in the processing.
There are many storage tiers; rotational applies only to one of the
coldest. In my use case, at least, I've added the following patchlet:
- devices_info[ndevs].rotational = !test_bit(QUEUE_FLAG_NONROT,
+ devices_info[ndevs].rotational = !test_bit(QUEUE_FLAG_DAX,
Or, you may want Optane NVMe vs legacy (ie, NAND) NVMe.
The tiers look like:
* DIMM-connected Optane (dax=1)
* NVMe-connected Optane
* NVMe-connected flash
* SATA-connected flash
* SATA-connected spinning rust (rotational=1)
* IDE-connected spinning rust (rotational=1)
* SD cards
* floppies?
And even that is just for local storage only.
Thus, please don't hardcode the notion of "rotational", what we want is
"faster but smaller" vs "slower but bigger".
> > From: Goffredo Baroncelli <kreijack@inwind.it>
> >
> > When this mode is enabled, the allocation policy of the chunk
> > is so modified:
> > - allocation of metadata chunk: priority is given to ssd disk.
> > - allocation of data chunk: priority is given to a rotational disk.
> >
> > When a striped profile is involved (like RAID0,5,6), the logic
> > is a bit more complex. If there are enough disks, the data profiles
> > are stored on the rotational disks only; instead the metadata profiles
> > are stored on the non rotational disk only.
> > If the disks are not enough, then the profiles is stored on all
> > the disks.
And, a newer version of Goffredo's patchset already had
"preferred_metadata". It did not assign the preference automatically,
but if we want god defaults, they should be smarter than just rotationality.
Meow!
--
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Imagine there are bandits in your house, your kid is bleeding out,
⢿⡄⠘⠷⠚⠋⠀ the house is on fire, and seven giant trumpets are playing in the
⠈⠳⣄⠀⠀⠀⠀ sky. Your cat demands food. The priority should be obvious...
next prev parent reply other threads:[~2020-10-23 10:11 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-05 8:26 [RFC][PATCH V3] btrfs: ssd_metadata: storing metadata on SSD Goffredo Baroncelli
2020-04-05 8:26 ` [PATCH] btrfs: add ssd_metadata mode Goffredo Baroncelli
2020-04-14 5:24 ` Paul Jones
2020-10-23 7:23 ` Wang Yugui
2020-10-23 10:11 ` Adam Borowski [this message]
2020-10-23 11:25 ` Qu Wenruo
2020-10-23 12:37 ` Wang Yugui
2020-10-23 12:45 ` Qu Wenruo
2020-10-23 13:10 ` Steven Davies
2020-10-23 13:49 ` Wang Yugui
2020-10-23 18:03 ` Goffredo Baroncelli
2020-10-24 3:26 ` Paul Jones
2020-04-05 10:57 ` [RFC][PATCH V3] btrfs: ssd_metadata: storing metadata on SSD Graham Cobb
2020-04-05 18:47 ` Goffredo Baroncelli
2020-04-05 21:58 ` Adam Borowski
2020-04-06 2:24 ` Zygo Blaxell
2020-04-06 16:43 ` Goffredo Baroncelli
2020-04-06 17:21 ` Zygo Blaxell
2020-04-06 17:33 ` Goffredo Baroncelli
2020-04-06 17:40 ` Zygo Blaxell
2020-05-29 16:06 ` Hans van Kranenburg
2020-05-29 16:40 ` Goffredo Baroncelli
2020-05-29 18:37 ` Hans van Kranenburg
2020-05-30 4:59 ` Qu Wenruo
2020-05-30 6:48 ` Goffredo Baroncelli
2020-05-30 8:57 ` Paul Jones
-- strict thread matches above, loose matches on Subject: below --
2020-04-05 7:19 [RFC][PATCH v2] " Goffredo Baroncelli
2020-04-05 7:19 ` [PATCH] btrfs: add ssd_metadata mode Goffredo Baroncelli
2020-04-01 20:03 [RFC] btrfs: ssd_metadata: storing metadata on SSD Goffredo Baroncelli
2020-04-01 20:03 ` [PATCH] btrfs: add ssd_metadata mode Goffredo Baroncelli
2020-04-01 20:53 ` Goffredo Baroncelli
2020-04-02 9:33 ` Steven Davies
2020-04-02 16:39 ` Goffredo Baroncelli
2020-04-03 8:43 ` Michael
2020-04-03 10:08 ` Steven Davies
2020-04-03 16:19 ` Goffredo Baroncelli
2020-04-03 16:28 ` Hugo Mills
2020-04-03 16:36 ` Hans van Kranenburg
2020-04-02 18:01 ` Martin Svec
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=20201023101145.GB19860@angband.pl \
--to=kilobyte@angband.pl \
--cc=hugo@carfax.org.uk \
--cc=kreijack@inwind.it \
--cc=kreijack@libero.it \
--cc=linux-btrfs@vger.kernel.org \
--cc=martin.svec@zoner.cz \
--cc=mclaud@roznica.com.ua \
--cc=wangyugui@e16-tech.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).