diff options
author | Markus Stockhausen <stockhausen@collogia.de> | 2014-12-15 04:57:05 +0300 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2015-04-22 01:00:42 +0300 |
commit | d06f191f8ecaef4d524e765fdb455f96392fbd42 (patch) | |
tree | 3e83449b9fb3c910a7a6d65a776304dd158e18c4 /drivers/md/raid5.h | |
parent | 584acdd49cd2472ca0f5a06adbe979db82d0b4af (diff) | |
download | linux-d06f191f8ecaef4d524e765fdb455f96392fbd42.tar.xz |
md/raid5: introduce configuration option rmw_level
Depending on the available coding we allow optimized rmw logic for write
operations. To support easier testing this patch allows manual control
of the rmw/rcw descision through the interface /sys/block/mdX/md/rmw_level.
The configuration can handle three levels of control.
rmw_level=0: Disable rmw for all RAID types. Hardware assisted P/Q
calculation has no implementation path yet to factor in/out chunks of
a syndrome. Enforcing this level can be benefical for slow CPUs with
hardware syndrome support and fast SSDs.
rmw_level=1: Estimate rmw IOs and rcw IOs. Execute rmw only if we will
save IOs. This equals the "old" unpatched behaviour and will be the
default.
rmw_level=2: Execute rmw even if calculated IOs for rmw and rcw are
equal. We might have higher CPU consumption because of calculating the
parity twice but it can be benefical otherwise. E.g. RAID4 with fast
dedicated parity disk/SSD. The option is implemented just to be
forward-looking and will ONLY work with this patch!
Signed-off-by: Markus Stockhausen <stockhausen@collogia.de>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/raid5.h')
-rw-r--r-- | drivers/md/raid5.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/md/raid5.h b/drivers/md/raid5.h index 57fef9ba36fa..6614ac5ffc0e 100644 --- a/drivers/md/raid5.h +++ b/drivers/md/raid5.h @@ -362,6 +362,7 @@ enum { enum { PARITY_DISABLE_RMW = 0, PARITY_ENABLE_RMW, + PARITY_PREFER_RMW, }; /* |