From: Jens Axboe <axboe@fb.com>
To: "Huang, Ying" <ying.huang@intel.com>, 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>
Subject: Re: [PATCH] swap: add block io poll in swapin path
Date: Fri, 5 May 2017 07:47:27 -0600 [thread overview]
Message-ID: <a260882d-3247-8410-b4fe-bc5f19c90beb@fb.com> (raw)
In-Reply-To: <878tmb265d.fsf@yhuang-dev.intel.com>
On 05/05/2017 12:02 AM, Huang, Ying wrote:
>> The hybrid polling could help. The default hybrid polling poll half
>> the average IO latency. But it will not work very well if the latency
>> becomes very big. The hybrid polling has an interface to allow
>> userspace to configure the poll threshold, but since the latency
>> varies from time to time, it would be very hard to set a single
>> threshold for all workloads.
>
> If my understanding were correct, the hybrid polling will insert some
> sleep before the polling, but will not restrict the duration of the
> polling itself. This helps CPU usage, but may not help much for very
> long latency. How about add another threshold to restrict the max
> polling time? For example, the sleep time + max polling time could be
> 1.5 * mean latency. So that most IO requests could be serviced by
> polling, and for very long latency, polling could be restricted to
> reduce CPU usage.
I don't think that's a bad idea at all, there's definitely room for
improvement on how long to sleep and when to completely stop. The stats
track min/avg/max for a given window of time, so it would not be too
hard to implement an appropriate backoff as well.
--
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>
prev parent reply other threads:[~2017-05-05 13:47 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
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 [this message]
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=a260882d-3247-8410-b4fe-bc5f19c90beb@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