From: Mel Gorman <mgorman@techsingularity.net>
To: LKML <linux-kernel@vger.kernel.org>,
Linux-MM <linux-mm@kvack.org>,
Mel Gorman <mgorman@techsingularity.net>
Cc: Dave Chinner <david@fromorbit.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Ying Huang <ying.huang@intel.com>,
Michal Hocko <mhocko@kernel.org>
Subject: [PATCH 2/4] block, brd: Treat storage as non-rotational
Date: Fri, 9 Sep 2016 10:59:33 +0100 [thread overview]
Message-ID: <1473415175-20807-3-git-send-email-mgorman@techsingularity.net> (raw)
In-Reply-To: <1473415175-20807-1-git-send-email-mgorman@techsingularity.net>
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
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2016-09-09 9:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-09 9:59 [RFC PATCH 0/4] Reduce tree_lock contention during swap and reclaim of a single file v1 Mel Gorman
2016-09-09 9:59 ` [PATCH 1/4] mm, vmscan: Batch removal of mappings under a single lock during reclaim Mel Gorman
2016-09-16 13:25 ` Peter Zijlstra
2016-09-16 14:07 ` Peter Zijlstra
2016-09-16 18:33 ` Linus Torvalds
2016-09-17 1:36 ` Peter Zijlstra
2016-09-09 9:59 ` Mel Gorman [this message]
2016-09-09 9:59 ` [PATCH 3/4] mm, vmscan: Stall kswapd if contending on tree_lock Mel Gorman
2016-09-09 9:59 ` [PATCH 4/4] mm, vmscan: Potentially stall direct reclaimers on tree_lock contention Mel Gorman
2016-09-09 15:31 ` [RFC PATCH 0/4] Reduce tree_lock contention during swap and reclaim of a single file v1 Linus Torvalds
2016-09-09 16:19 ` Mel Gorman
2016-09-09 18:16 ` Huang, Ying
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=1473415175-20807-3-git-send-email-mgorman@techsingularity.net \
--to=mgorman@techsingularity.net \
--cc=david@fromorbit.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=ying.huang@intel.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).