From 4e21fd060a567a9c8a1bd0e640985412181c1e33 Mon Sep 17 00:00:00 2001 From: Don Brady Date: Thu, 12 Jan 2017 12:52:56 -0700 Subject: OpenZFS 7303 - dynamic metaslab selection This change introduces a new weighting algorithm to improve metaslab selection. The new weighting algorithm relies on the SPACEMAP_HISTOGRAM feature. As a result, the metaslab weight now encodes the type of weighting algorithm used (size-based vs segment-based). Porting Notes: The metaslab allocation tracing code is conditionally removed on linux (dependent on mdb debugger). Authored by: George Wilson Reviewed by: Alex Reece Reviewed by: Chris Siden Reviewed by: Dan Kimmel Reviewed by: Matthew Ahrens Reviewed by: Paul Dagnelie Reviewed by: Pavel Zakharov pavel.zakharov@delphix.com Reviewed by: Prakash Surya Reviewed by: Don Brady Reviewed-by: Brian Behlendorf Ported-by: Don Brady OpenZFS-issue: https://www.illumos.org/issues/7303 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/d5190931bd Closes #5404 --- include/sys/zio.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/sys/zio.h') diff --git a/include/sys/zio.h b/include/sys/zio.h index 6c5153dcf..1f8708e5a 100644 --- a/include/sys/zio.h +++ b/include/sys/zio.h @@ -358,6 +358,11 @@ typedef int zio_pipe_stage_t(zio_t *zio); #define ZIO_REEXECUTE_NOW 0x01 #define ZIO_REEXECUTE_SUSPEND 0x02 +typedef struct zio_alloc_list { + list_t zal_list; + uint64_t zal_size; +} zio_alloc_list_t; + typedef struct zio_link { zio_t *zl_parent; zio_t *zl_child; @@ -417,6 +422,7 @@ struct zio { avl_node_t io_queue_node; avl_node_t io_offset_node; avl_node_t io_alloc_node; + zio_alloc_list_t io_alloc_list; /* Internal pipeline state */ enum zio_flag io_flags; -- cgit v1.2.3