linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Shaohua Li <shli@fb.com>
To: Jens Axboe <axboe@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 14:27:26 -0700	[thread overview]
Message-ID: <20170504212725.GA26681@MacBook-Pro.dhcp.thefacebook.com> (raw)
In-Reply-To: <b1fec49f-5e22-3d0c-1725-09625b3047b0@fb.com>

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. 

Thanks,
Shaohua

--
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>

  reply	other threads:[~2017-05-04 21:27 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 [this message]
2017-05-04 21:29     ` Jens Axboe
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=20170504212725.GA26681@MacBook-Pro.dhcp.thefacebook.com \
    --to=shli@fb.com \
    --cc=Kernel-team@fb.com \
    --cc=akpm@linux-foundation.org \
    --cc=axboe@fb.com \
    --cc=linux-mm@kvack.org \
    --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