All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH RFC 4/6] btrfs: Check if the filesystem is has mixed type of devices
@ 2021-02-10  8:03 kernel test robot
  0 siblings, 0 replies; 11+ messages in thread
From: kernel test robot @ 2021-02-10  8:03 UTC (permalink / raw)
  To: kbuild

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

CC: kbuild-all(a)lists.01.org
In-Reply-To: <20210209203041.21493-5-mrostecki@suse.de>
References: <20210209203041.21493-5-mrostecki@suse.de>
TO: Michal Rostecki <mrostecki@suse.de>

Hi Michal,

[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on v5.11-rc7]
[also build test WARNING on next-20210125]
[cannot apply to kdave/for-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Michal-Rostecki/Add-roundrobin-raid1-read-policy/20210210-053511
base:    92bf22614b21a2706f4993b278017e437f7785b3
:::::: branch date: 10 hours ago
:::::: commit date: 10 hours ago
config: i386-randconfig-m021-20210209 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>

New smatch warnings:
fs/btrfs/volumes.c:635 btrfs_check_mixed() error: uninitialized symbol 'prev_device'.

Old smatch warnings:
fs/btrfs/volumes.c:1264 open_fs_devices() error: we previously assumed 'latest_dev' could be null (see line 1252)
fs/btrfs/volumes.h:218 btrfs_device_set_total_bytes() warn: statement has no effect 31
fs/btrfs/volumes.h:219 btrfs_device_set_disk_total_bytes() warn: statement has no effect 31
fs/btrfs/volumes.h:220 btrfs_device_set_bytes_used() warn: statement has no effect 31

vim +/prev_device +635 fs/btrfs/volumes.c

4fde46f0cc71c7 Anand Jain      2015-06-17  619  
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  620  /*
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  621   * Checks if after adding the new device the filesystem is going to have mixed
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  622   * types of devices (non-rotational and rotational).
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  623   *
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  624   * @fs_devices:          list of devices
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  625   * @new_device_rotating: if the new device is rotational
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  626   *
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  627   * Returns true if there are mixed types of devices, otherwise returns false.
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  628   */
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  629  static bool btrfs_check_mixed(struct btrfs_fs_devices *fs_devices,
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  630  			      bool new_device_rotating)
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  631  {
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  632  	struct btrfs_device *device, *prev_device;
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  633  
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  634  	list_for_each_entry(device, &fs_devices->devices, dev_list) {
bd7608b9a9bbf6 Michal Rostecki 2021-02-09 @635  		if (prev_device == NULL &&
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  636  		    device->rotating != new_device_rotating)
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  637  			return true;
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  638  		if (prev_device != NULL &&
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  639  		    (device->rotating != prev_device->rotating ||
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  640  		     device->rotating != new_device_rotating))
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  641  			return true;
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  642  
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  643  		prev_device = device;
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  644  	}
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  645  
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  646  	return false;
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  647  }
bd7608b9a9bbf6 Michal Rostecki 2021-02-09  648  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 37174 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread
* [PATCH RFC 0/6] Add roundrobin raid1 read policy
@ 2021-02-09 20:30 Michal Rostecki
  2021-02-09 20:30 ` [PATCH RFC 4/6] btrfs: Check if the filesystem is has mixed type of devices Michal Rostecki
  0 siblings, 1 reply; 11+ messages in thread
From: Michal Rostecki @ 2021-02-09 20:30 UTC (permalink / raw)
  To: Chris Mason, Josef Bacik, David Sterba,
	open list:BTRFS FILE SYSTEM, open list
  Cc: Michal Rostecki

From: Michal Rostecki <mrostecki@suse.com>

This patch series adds a new raid1 read policy - roundrobin. For each
request, it selects the mirror which has lower load than queue depth.
Load is defined  as the number of inflight requests + a penalty value
(if the scheduled request is not local to the last processed request for
a rotational disk).

The series consists of preparational changes which add necessary
information to the btrfs_device struct and the change with the policy.

This policy was tested with fio and compared with the default `pid`
policy.

The singlethreaded test has the following parameters:

  [global]
  name=btrfs-raid1-seqread
  filename=btrfs-raid1-seqread
  rw=read
  bs=64k
  direct=0
  numjobs=1
  time_based=0

  [file1]
  size=10G
  ioengine=libaio

and shows the following results:

- raid1c3 with 3 HDDs:
  3 x Segate Barracuda ST2000DM008 (2TB)
  * pid policy
    READ: bw=217MiB/s (228MB/s), 217MiB/s-217MiB/s (228MB/s-228MB/s),
    io=10.0GiB (10.7GB), run=47082-47082msec
  * roundrobin policy
    READ: bw=409MiB/s (429MB/s), 409MiB/s-409MiB/s (429MB/s-429MB/s),
    io=10.0GiB (10.7GB), run=25028-25028mse
- raid1c3 with 2 HDDs and 1 SSD:
  2 x Segate Barracuda ST2000DM008 (2TB)
  1 x Crucial CT256M550SSD1 (256GB)
  * pid policy (the worst case when only HDDs were chosen)
    READ: bw=220MiB/s (231MB/s), 220MiB/s-220MiB/s (231MB/s-231MB/s),
    io=10.0GiB (10.7GB), run=46577-46577mse
  * pid policy (the best case when SSD was used as well)
    READ: bw=513MiB/s (538MB/s), 513MiB/s-513MiB/s (538MB/s-538MB/s),
    io=10.0GiB (10.7GB), run=19954-19954msec
  * roundrobin (there are no noticeable differences when testing multiple
    times)
    READ: bw=541MiB/s (567MB/s), 541MiB/s-541MiB/s (567MB/s-567MB/s),
    io=10.0GiB (10.7GB), run=18933-18933msec

The multithreaded test has the following parameters:

  [global]
  name=btrfs-raid1-seqread
  filename=btrfs-raid1-seqread
  rw=read
  bs=64k
  direct=0
  numjobs=8
  time_based=0

  [file1]
  size=10G
  ioengine=libaio

and shows the following results:

- raid1c3 with 3 HDDs: 3 x Segate Barracuda ST2000DM008 (2TB)
  3 x Segate Barracuda ST2000DM008 (2TB)
  * pid policy
    READ: bw=1569MiB/s (1645MB/s), 196MiB/s-196MiB/s (206MB/s-206MB/s),
    io=80.0GiB (85.9GB), run=52210-52211msec
  * roundrobin
    READ: bw=1733MiB/s (1817MB/s), 217MiB/s-217MiB/s (227MB/s-227MB/s),
    io=80.0GiB (85.9GB), run=47269-47271msec
- raid1c3 with 2 HDDs and 1 SSD:
  2 x Segate Barracuda ST2000DM008 (2TB)
  1 x Crucial CT256M550SSD1 (256GB)
  * pid policy
    READ: bw=1843MiB/s (1932MB/s), 230MiB/s-230MiB/s (242MB/s-242MB/s),
    io=80.0GiB (85.9GB), run=44449-44450msec
  * roundrobin
    READ: bw=2485MiB/s (2605MB/s), 311MiB/s-311MiB/s (326MB/s-326MB/s),
    io=80.0GiB (85.9GB), run=32969-32970msec

To measure the performance of each policy and find optimal penalty
values, I created scripts which are available here:

https://gitlab.com/vadorovsky/btrfs-perf
https://github.com/mrostecki/btrfs-perf

Michal Rostecki (6):
  btrfs: Add inflight BIO request counter
  btrfs: Store the last device I/O offset
  btrfs: Add stripe_physical function
  btrfs: Check if the filesystem is has mixed type of devices
  btrfs: sysfs: Add directory for read policies
  btrfs: Add roundrobin raid1 read policy

 fs/btrfs/ctree.h   |   3 +
 fs/btrfs/disk-io.c |   3 +
 fs/btrfs/sysfs.c   | 144 ++++++++++++++++++++++++++----
 fs/btrfs/volumes.c | 218 +++++++++++++++++++++++++++++++++++++++++++--
 fs/btrfs/volumes.h |  22 +++++
 5 files changed, 366 insertions(+), 24 deletions(-)

-- 
2.30.0


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-02-15 14:42 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-10  8:03 [PATCH RFC 4/6] btrfs: Check if the filesystem is has mixed type of devices kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2021-02-09 20:30 [PATCH RFC 0/6] Add roundrobin raid1 read policy Michal Rostecki
2021-02-09 20:30 ` [PATCH RFC 4/6] btrfs: Check if the filesystem is has mixed type of devices Michal Rostecki
2021-02-10  4:08   ` Michał Mirosław
2021-02-10 12:50     ` Michal Rostecki
2021-02-12 18:26     ` Michal Rostecki
2021-02-12 23:36       ` Michał Mirosław
2021-02-15 14:40         ` Michal Rostecki
2021-02-10  8:09   ` Dan Carpenter
2021-02-10  8:09     ` Dan Carpenter
2021-02-10 10:09   ` Filipe Manana
2021-02-10 12:55     ` Michal Rostecki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.