From patchwork Thu Aug 31 06:10:17 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Valente X-Patchwork-Id: 111356 Delivered-To: patch@linaro.org Received: by 10.140.95.112 with SMTP id h103csp2072335qge; Wed, 30 Aug 2017 23:10:57 -0700 (PDT) X-Received: by 10.84.215.217 with SMTP id g25mr1420947plj.45.1504159857127; Wed, 30 Aug 2017 23:10:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504159857; cv=none; d=google.com; s=arc-20160816; b=fsBe7NR0d1mr+q3QZfAyxeNgZYnNTsq6cGUEJTeLXM3dPDmRSbzkAUU7BNOV7OHTTP IsJ9n60iK1etjHQwKur0vA7jwvTqI3AmNNHxE3tmfZ7G24zXk7VEP153xk4meMxFR8s6 BxCqFnoQwf9aM/cw0DtoG9RweJKcn8pn8GxuwqOYoq3h9Gtu4ID06/Q6fB++rKHDN2nz ILZfCUJdqbFIHHePmIEIEASo7xyAt4dzRmIm9LtOa2M4hRH5I00CgO+YewrOPJonHZuF pQ6S+m3s5EqNxFhV2dHNGLvcyGXeWmdkYZDdQU3LdbLn9WQ8QiYzgh4H40GK+TlH/2oe gH3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=TrVm6ysIe65UGwbN2BAv4pwNcz22wL1uJP4eRGvAmm4=; b=Bb80/Ia40ThQf15jq3ISNH4TCmY+d9+eLFcor7yRu5mlhEWH1XEAoTlWJpX6diLqt0 TVmKohX/QRG+ZwlF2loAT8/8gsX1WCxPCAQvikkoi9Enx4yRjEVm8EqyB5IPnwVufpiD HguwgZPiWbPK4z0zyadUqoLhXs9jbgevERO6Al3Emm/z1wLTffu1wjyaG/1d3+/QTirb jD4fV9vxGr+zS0u+TVRliD6C0lqs37t63nnjiSjJVu3jyPdikNJxHrFnYpzmyoiJRCyB ZyCK9LZjiI2qhWP6ZxA+skItakEcY5fdFrh/V4tmvuD45unFVDupag70RNUXcB6GEt8X aKJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aXbbwaf/; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x185si5904538pgd.461.2017.08.30.23.10.56; Wed, 30 Aug 2017 23:10:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aXbbwaf/; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751406AbdHaGKx (ORCPT + 26 others); Thu, 31 Aug 2017 02:10:53 -0400 Received: from mail-wm0-f49.google.com ([74.125.82.49]:37983 "EHLO mail-wm0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751341AbdHaGKt (ORCPT ); Thu, 31 Aug 2017 02:10:49 -0400 Received: by mail-wm0-f49.google.com with SMTP id 187so13363467wmn.1 for ; Wed, 30 Aug 2017 23:10:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=TrVm6ysIe65UGwbN2BAv4pwNcz22wL1uJP4eRGvAmm4=; b=aXbbwaf/tU6NBA69XLAw9jZfs9fSMFzpSDWa4jCIgQsFi+QzIFAyhVSe48867PQ/YX RGHDfI7XvJMtGec2r6sDD1sA+2XjQLk1GjLgHMdoC30XNWfQszDXzIuEm8KvMHBvbdb3 HxabzeBAGPA0OLBF6O6vsDIAzT9JDsCUcQ7/k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=TrVm6ysIe65UGwbN2BAv4pwNcz22wL1uJP4eRGvAmm4=; b=T428obumdEF+ecq5bVCtTj7Xxa78cHI6GVb8SGw1f/0gE7LVgmPEW1bke5Smp3rOck VrkEoZNlcLSKSW7lIj/tUTuuoZSBhejNIiFZR7vkDMJgLyV/K3ZEENn1nsBHl2HksO1e U42fTYJwi4QjYHXmLZoH1qj3lRUS6aliD45iepMAOSOKTDMOb+/qKvUVbIS3q1GAXe+N e+2sgBVq6yiOrmQP571HKkRZh1njs7KQqtCsDpZRVSgaHrfkQNnOIhFQTdJNgzJL4Eci G6ObSg2Ppo1mW4Ys6BwqENZL+/3bjGYfBjBmQfRJTDCNovhONXf+OWqyqmVFawsgJmBX SRMw== X-Gm-Message-State: AHYfb5j966Ma2I/NqSf+76JtGJUU5CJDQ/6OBSNb8TFyZzibcxhJ04pp CISOOXmBqQZ2GMx5 X-Received: by 10.28.10.204 with SMTP id 195mr2657949wmk.30.1504159848179; Wed, 30 Aug 2017 23:10:48 -0700 (PDT) Received: from localhost.localdomain ([185.14.8.94]) by smtp.gmail.com with ESMTPSA id t8sm6676897wrg.21.2017.08.30.23.10.46 (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 30 Aug 2017 23:10:47 -0700 (PDT) From: Paolo Valente To: Jens Axboe Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, ulf.hansson@linaro.org, broonie@kernel.org, mgorman@techsingularity.net, lee.tibbert@gmail.com, oleksandr@natalenko.name, Paolo Valente Subject: [PATCH BUGFIX/IMPROVEMENT 0/3] three bfq fixes restoring service guarantees with random sync writes in bg Date: Thu, 31 Aug 2017 08:10:17 +0200 Message-Id: <20170831061020.4426-1-paolo.valente@linaro.org> X-Mailer: git-send-email 2.10.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, while testing the read-write unfairness issues reported by Mel, I found BFQ failing to guarantee good responsiveness against heavy random sync writes in the background, i.e., multiple writers doing random writes and systematic fdatasync [1]. The failure was caused by three related bugs, because of which BFQ failed to guarantee to high-weight processes the expected fraction of the throughput. The three patches in this series fix these bugs. These fixes restore the usual BFQ service guarantees (and thus optimal responsiveness too), against the above background workload and, probably, against other similar workloads. Thanks, Paolo [1] https://lkml.org/lkml/2017/8/9/957 Paolo Valente (3): block, bfq: make lookup_next_entity push up vtime on expirations block, bfq: remove direct switch to an entity in higher class block, bfq: guarantee update_next_in_service always returns an eligible entity block/bfq-iosched.c | 4 +-- block/bfq-iosched.h | 4 +-- block/bfq-wf2q.c | 91 ++++++++++++++++++++++++++++++++--------------------- 3 files changed, 60 insertions(+), 39 deletions(-) -- 2.10.0