lkml.org 
[lkml]   [2016]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/4] block, brd: Treat storage as non-rotational
Date
Unlike the rims of a punked out car, RAM does not spin. Ramdisk as
implemented by the brd is treated as rotational storage. When used as swap
to simulate fast storage, swap uses the algoritms for minimising seek times
instead of the algorithms optimised for SSD. When the tree_lock contention
was reduced by the previous patch, it was found that the workload was
dominated by scan_swap_map(). This patch has no practical application as
swap-on-ramdisk is dumb is rocks but it's trivial to fix.

4.8.0-rc5 4.8.0-rc5
batch-v1 ramdisknonrot-v1
Amean System-1 192.98 ( 0.00%) 181.00 ( 6.21%)
Amean System-3 198.33 ( 0.00%) 86.19 ( 56.54%)
Amean System-5 105.22 ( 0.00%) 67.43 ( 35.91%)
Amean System-7 97.79 ( 0.00%) 89.55 ( 8.42%)
Amean System-8 149.39 ( 0.00%) 102.92 ( 31.11%)
Amean Elapsd-1 219.95 ( 0.00%) 209.23 ( 4.88%)
Amean Elapsd-3 79.02 ( 0.00%) 36.93 ( 53.26%)
Amean Elapsd-5 29.88 ( 0.00%) 19.52 ( 34.69%)
Amean Elapsd-7 24.06 ( 0.00%) 21.93 ( 8.84%)
Amean Elapsd-8 33.34 ( 0.00%) 23.63 ( 29.12%)

Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
---
drivers/block/brd.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/block/brd.c b/drivers/block/brd.c
index 0c76d4016eeb..83a76a74e027 100644
--- a/drivers/block/brd.c
+++ b/drivers/block/brd.c
@@ -504,6 +504,7 @@ static struct brd_device *brd_alloc(int i)
blk_queue_max_discard_sectors(brd->brd_queue, UINT_MAX);
brd->brd_queue->limits.discard_zeroes_data = 1;
queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, brd->brd_queue);
+ queue_flag_set_unlocked(QUEUE_FLAG_NONROT, brd->brd_queue);
#ifdef CONFIG_BLK_DEV_RAM_DAX
queue_flag_set_unlocked(QUEUE_FLAG_DAX, brd->brd_queue);
#endif
--
2.6.4
\
 
 \ /
  Last update: 2016-09-17 09:58    [W:0.108 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site