From patchwork Thu Aug 31 06:46:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Valente X-Patchwork-Id: 111360 Delivered-To: patch@linaro.org Received: by 10.140.95.112 with SMTP id h103csp2106836qge; Wed, 30 Aug 2017 23:46:49 -0700 (PDT) X-Received: by 10.84.216.87 with SMTP id f23mr1489564plj.283.1504162009195; Wed, 30 Aug 2017 23:46:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504162009; cv=none; d=google.com; s=arc-20160816; b=faTzd4JCVJQmP1a6XkV/atDKLGc1Q5May8Y2U/R7TE0kovJzDQj20q/4nOsvRqXKAo L+izF5gkLSXlIh8i+Dw94GSJuIfW1nx/aa/0/rBiw6p5SRVaEweJdsla9+cI8jW3cHuD 7sO/+5rCEzqHWPksPeMqdInsDwP0/jxCQw8l/2M0VF4sJcloG4zTmgapYLQHqzGoV5H+ GQfucCpMMt+TfV9ikCMA/KY1kAxl5EExgr1MyBjQESJ2l2Vb0y/EpNDUdu6HrG9r5b50 SqN34PvV73dH3kd6kwHZbu8jNv4aTjuyyxEYyuuAgv8xEjSzmrqT/F8nDN0mi903IzzC C85w== 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=D6V9YDjavSbOC9+/7B18fbsWmqBbXhpcEqZ6G+gy8nQ=; b=XsWTJL1GtMyAyEyC+NFSlknKtj9Ko8AZK3SLw/EtRrBSYRXLdTZN7qww2vabWwZkmN i1eR0CggFgMlIGPfxhtp+zRP3UQL2JOZKXMHoo9ksiIUhQOGBrIgwCZKJacHuC16BC+x WwY6sNqENVnFLf6I7YMfzp55Ep+MZ+orstRgfVONIxA44S+p5uiBcv1PVq8wWnGTMNJ1 qM9BE37pdDopO8sm9mnTHjHLrVAIQq5faTdQ7MrFULg9+Z8xyHHM3jtsm+aRusFU7Lwo 0wo1HVCK8SCa1B6NvBznaCBsNo03PuvrkPWZXxk0WvkqKT3RUXDRjVNvM75Ig950iF5v zxVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QR/q8+5S; 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 b96si6137509pli.420.2017.08.30.23.46.48; Wed, 30 Aug 2017 23:46:49 -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=QR/q8+5S; 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 S1751103AbdHaGqq (ORCPT + 26 others); Thu, 31 Aug 2017 02:46:46 -0400 Received: from mail-wm0-f42.google.com ([74.125.82.42]:35826 "EHLO mail-wm0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750998AbdHaGqo (ORCPT ); Thu, 31 Aug 2017 02:46:44 -0400 Received: by mail-wm0-f42.google.com with SMTP id a80so22094987wma.0 for ; Wed, 30 Aug 2017 23:46:43 -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=D6V9YDjavSbOC9+/7B18fbsWmqBbXhpcEqZ6G+gy8nQ=; b=QR/q8+5S8z6l4/Jp9A+YY4oLB1joryKT2k6qEwl+clVyijyuEhCaxY6cLyDCjgnoS3 u2nJ+qg1dpTCZ0GGozmvW0zS5Nhx2AIY2NXHQ1+brv6txNTvxsyFuIaC8Pvxaf6Z7oAw 5aRlJnWgVUNtgco53zfgWAy1Y3CE8nhvoUOl4= 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=D6V9YDjavSbOC9+/7B18fbsWmqBbXhpcEqZ6G+gy8nQ=; b=CAnDU4bWbvAaWSt5tSeAPuh/W9Tsm2H5IwDZ6Pm9uGjZLjNMW8+2+UA5jrOt7gdAt+ 6snGjItov7/ajs6N732OtoOaA9PS4Uwny43LPxazgbw1lUHHNPCvguVPcIsMfbXzjnGj EvcQvziKOzLcw1G8L+yvM/yUMc9ijan/ux13oFF8dLpGlytvW8dHohsLs63oXpj9Zp7+ vkfGGSmpO39MbHn6bjemctdK6TJ57j6CoBwEle+2YPJCmtwF5iCwm3ISRBObb38gt8XP bdwANqx5EsZc1X0PzjMsnqALwX7OSOAWtU3ADqEwotkW5TEf1lPZ5Gu1vuC64NjynIwg RRKw== X-Gm-Message-State: AHYfb5hGs8nbhEWXujT9TEeNpd2YDI8cBVpr419WMniVbmyP4WkSd486 ToJe2hw99ODI2aHP X-Received: by 10.28.101.7 with SMTP id z7mr3250267wmb.22.1504162003272; Wed, 30 Aug 2017 23:46:43 -0700 (PDT) Received: from localhost.localdomain ([185.14.8.94]) by smtp.gmail.com with ESMTPSA id s15sm6497667wrg.84.2017.08.30.23.46.41 (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 30 Aug 2017 23:46:42 -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 V2 0/3] three bfq fixes restoring service guarantees with random sync writes in bg Date: Thu, 31 Aug 2017 08:46:28 +0200 Message-Id: <20170831064631.2223-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 [SECOND TAKE, with just the name of one of the tester fixed] 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