[PATCH 6/6] blk-iolatency: keep track of previous windows stats

2018-09-10 Thread Josef Bacik
We apply a smoothing to the scale changes in order to keep sawtoothy behavior from occurring. However our window for checking if we've missed our target can sometimes be lower than the smoothing interval (500ms), especially on faster drives like ssd's. In order to deal with this keep track of

[PATCH 5/6] blk-iolatency: use a percentile approache for ssd's

2018-09-10 Thread Josef Bacik
We use an average latency approach for determining if we're missing our latency target. This works well for rotational storage where we have generally consistent latencies, but for ssd's and other low latency devices you have more of a spikey behavior, which means we often won't throttle

[PATCH 4/6] blk-iolatency: deal with small samples

2018-09-10 Thread Josef Bacik
There is logic to keep cgroups that haven't done a lot of IO in the most recent scale window from being punished for over-active higher priority groups. However for things like ssd's where the windows are pretty short we'll end up with small numbers of samples, so 5% of samples will come out to 0

[PATCH 3/6] blk-iolatency: deal with nr_requests == 1

2018-09-10 Thread Josef Bacik
Hitting the case where blk_queue_depth() returned 1 uncovered the fact that iolatency doesn't actually handle this case properly, it simply doesn't scale down anybody. For this case we should go straight into applying the time delay, which we weren't doing. Since we already limit the floor at 1

[PATCH 2/6] blk-iolatency: delete changed variable

2018-09-10 Thread Josef Bacik
This was from a previous iteration when we returned whether or not we changed the scale. It is unused so remove it. Signed-off-by: Josef Bacik --- block/blk-iolatency.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/block/blk-iolatency.c b/block/blk-iolatency.c index

[PATCH 1/6] blk-iolatency: use q->nr_requests directly

2018-09-10 Thread Josef Bacik
We were using blk_queue_depth() assuming that it would return nr_requests, but we hit a case in production on drives that had to have NCQ turned off in order for them to not shit the bed which resulted in a qd of 1, even though the nr_requests was much larger. iolatency really only cares about

Re: [GIT PULL] nvme fix for 4.19

2018-09-10 Thread Jens Axboe
On 9/10/18 12:02 AM, Christoph Hellwig wrote: > The following changes since commit bc811f05d77f47059c197a98b6ad242eb03999cb: > > nbd: don't allow invalid blocksize settings (2018-09-04 11:54:58 -0600) > > are available in the Git repository at: > > git://git.infradead.org/nvme.git nvme-4.19

[GIT PULL] nvme fix for 4.19

2018-09-10 Thread Christoph Hellwig
The following changes since commit bc811f05d77f47059c197a98b6ad242eb03999cb: nbd: don't allow invalid blocksize settings (2018-09-04 11:54:58 -0600) are available in the Git repository at: git://git.infradead.org/nvme.git nvme-4.19 for you to fetch changes up to