From: Jens Axboe <axboe@fb.com>
To: Shaohua Li <shli@fb.com>
Cc: linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
Kernel-team@fb.com, Tim Chen <tim.c.chen@intel.com>,
Huang Ying <ying.huang@intel.com>
Subject: Re: [PATCH] swap: add block io poll in swapin path
Date: Thu, 4 May 2017 15:29:17 -0600 [thread overview]
Message-ID: <196d941b-39cb-4526-1763-e480ba326a98@fb.com> (raw)
In-Reply-To: <20170504212725.GA26681@MacBook-Pro.dhcp.thefacebook.com>
On 05/04/2017 03:27 PM, Shaohua Li wrote:
> On Thu, May 04, 2017 at 02:53:59PM -0600, Jens Axboe wrote:
>> On 05/04/2017 02:42 PM, Shaohua Li wrote:
>>> For fast flash disk, async IO could introduce overhead because of
>>> context switch. block-mq now supports IO poll, which improves
>>> performance and latency a lot. swapin is a good place to use this
>>> technique, because the task is waitting for the swapin page to continue
>>> execution.
>>
>> Nitfy!
>>
>>> In my virtual machine, directly read 4k data from a NVMe with iopoll is
>>> about 60% better than that without poll. With iopoll support in swapin
>>> patch, my microbenchmark (a task does random memory write) is about 10%
>>> ~ 25% faster. CPU utilization increases a lot though, 2x and even 3x CPU
>>> utilization. This will depend on disk speed though. While iopoll in
>>> swapin isn't intended for all usage cases, it's a win for latency
>>> sensistive workloads with high speed swap disk. block layer has knob to
>>> control poll in runtime. If poll isn't enabled in block layer, there
>>> should be no noticeable change in swapin.
>>
>> Did you try with hybrid polling enabled? We should be able to achieve
>> most of the latency win at much less CPU cost with that.
>
> Hybrid poll is much slower than classic in my test, I tried different settings.
> maybe because this is a vm though.
It's probably a vm issue, I bet the timed sleep are just too slow to be
useful in a vm.
--
Jens Axboe
--
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:[~2017-05-04 21:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-04 20:42 Shaohua Li
2017-05-04 20:53 ` Jens Axboe
2017-05-04 21:27 ` Shaohua Li
2017-05-04 21:29 ` Jens Axboe [this message]
2017-05-04 23:23 ` Chen, Tim C
2017-05-05 2:24 ` Jens Axboe
2017-05-05 3:07 ` Huang, Ying
2017-05-05 5:12 ` Shaohua Li
2017-05-05 6:02 ` Huang, Ying
2017-05-05 13:47 ` Jens Axboe
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=196d941b-39cb-4526-1763-e480ba326a98@fb.com \
--to=axboe@fb.com \
--cc=Kernel-team@fb.com \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.org \
--cc=shli@fb.com \
--cc=tim.c.chen@intel.com \
--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