From patchwork Mon Jun 25 19:55:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Valente X-Patchwork-Id: 139885 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp4377632lji; Mon, 25 Jun 2018 12:56:02 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIanN33bn9bOjczf7yqQWTgq79lTtCWBWjK1sHCgSFJGTmy+AtpPg8sMCWRoIU8QiIyIVyW X-Received: by 2002:a62:8703:: with SMTP id i3-v6mr14394489pfe.115.1529956561939; Mon, 25 Jun 2018 12:56:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529956561; cv=none; d=google.com; s=arc-20160816; b=U4hf0hzwtivShTwnTZ1P/HRKYiAGTn2kLCWt8f8y/EP92qJeHxtwEGjDl/jHG+coOU V9FYUSpDhgwefSHBN4gjHBxA38njBT5yWo6ilarn5sgq0gVGEd2bMhQ0xzLdSPG/MFfh qvk5nwVBHSXFuwqO4QCmcy+sSidSUYMftCkEioKl55eX6w/x116dLzTnm67zNK6qujSd wYndOUXdYPalAuJWB68jkqJrHMsRcbghy2w4HwK6f+6MFwMF3JYWDRRlFCAN+8POCwuK UMb6vjABFU2sFk9808AdA38g0mr1qtX61VGIowVvNOoCK3F3uHZjScxQyhJOYtjPrEOE mPaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=v6cDwd+/4eCmk1MGKxYMdFTnaz1gvwnSx0DFbMN/pjg=; b=hneSLl5VY4yA5thmKJHKWEq/pYJvKBxK48/rO1Pp15IdjbN0M/KnMd8G0zBcdVTRyM +0fX15hnID1o6stscA+D3SVcWsczjsKGnGGIJlYp6GCF7RewDV1HifDpOZrhq/o/9yMv x+mi4+Tga5Fyn5pi1Q3Y/3xAHfHpruLxGXffuC1rZiNHUQATY+INQyC04gdNQBxMG86P Z+lU+/y4ZnIqOrJL2ai5sn32nDT/2x5nrNJ9Rv92683U0Xx5pDYDpZvFvY2/l4IKHh5W s/mtAMPeuLCupqsM2wt7fcq/Zu3aZhfg/mGe8J7me+OFkD4Dzhz3O0L2NEIG/JNolwQm z/LA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=FElmUAAn; 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 v12-v6si14642244plo.264.2018.06.25.12.56.01; Mon, 25 Jun 2018 12:56:01 -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=FElmUAAn; 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 S965117AbeFYT4A (ORCPT + 31 others); Mon, 25 Jun 2018 15:56:00 -0400 Received: from mail-wr0-f193.google.com ([209.85.128.193]:42522 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965094AbeFYTz4 (ORCPT ); Mon, 25 Jun 2018 15:55:56 -0400 Received: by mail-wr0-f193.google.com with SMTP id w10-v6so14865858wrk.9 for ; Mon, 25 Jun 2018 12:55:55 -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:in-reply-to:references; bh=v6cDwd+/4eCmk1MGKxYMdFTnaz1gvwnSx0DFbMN/pjg=; b=FElmUAAnN+fKF7otS+Y51Dvw5/gIlaGZ1rJi8U+p8MnWXEEHAiKpNeQjNDVZID1Aw5 BlKhhr/Dsm82A5X9drgQfgsT4n2JzlB5QaBp78kij8Sm5/ZVwwqAtVW25dNbjzTUb4Hv pdO/dQIyUyxoZeYKl3hCH0Hvc0cZ0nYAWoyg8= 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:in-reply-to :references; bh=v6cDwd+/4eCmk1MGKxYMdFTnaz1gvwnSx0DFbMN/pjg=; b=poNDPlzIoYIJzGyy4wy9pNU0+vJqLqcPS3t1UXAoZE4LsNR+1k/Xdyqb5ToR8GEnnq d/H6j0eKdgVdnu0nKINSk/v9C3x/ZxIvU/b1l4I3OWpXriO2gDBmickoKaGDVqJDs7Jh H/H1rJ3cK+Y7gqtQY2IsLnwdec4K/SkzwTg625E+jUCldz7RPV4yT33aUj0Ne3QzLVfN hZiy9AT5hrTGTkJOQVUTQPN7r9t1tsrc4Awe67wH1ftJs5RSA0tMP9vbrDzsgwRoaTSr zw1zQACgBFpyQWvD8EpIHBdNZmpF/3GY7Gt8R4oe1GLlfPZ7IwlPnf/rm6Uf4BDssLuk fT1Q== X-Gm-Message-State: APt69E2C1IX+KtGCe3dFGslnYFNeHlyDN9gCCGQ9f0g0kzrLmUVqrfPx zfsZCEBH3ZnfGw/ze0IxHKimFw== X-Received: by 2002:adf:a706:: with SMTP id c6-v6mr11730299wrd.61.1529956555025; Mon, 25 Jun 2018 12:55:55 -0700 (PDT) Received: from localhost.localdomain (146-241-36-97.dyn.eolo.it. [146.241.36.97]) by smtp.gmail.com with ESMTPSA id n18-v6sm29072897wrj.58.2018.06.25.12.55.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Jun 2018 12:55:54 -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, linus.walleij@linaro.org, bfq-iosched@googlegroups.com, oleksandr@natalenko.name, Paolo Valente Subject: [PATCH BUGFIX RESEND 4/4] block, bfq: give a better name to bfq_bfqq_may_idle Date: Mon, 25 Jun 2018 21:55:37 +0200 Message-Id: <20180625195537.7769-5-paolo.valente@linaro.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180625195537.7769-1-paolo.valente@linaro.org> References: <20180625195537.7769-1-paolo.valente@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The actual goal of the function bfq_bfqq_may_idle is to tell whether it is better to perform device idling (more precisely: I/O-dispatch plugging) for the input bfq_queue, either to boost throughput or to preserve service guarantees. This commit improves the name of the function accordingly. Signed-off-by: Paolo Valente --- block/bfq-iosched.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) -- 2.16.1 diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c index d579cc8e0db6..41d9036b1822 100644 --- a/block/bfq-iosched.c +++ b/block/bfq-iosched.c @@ -634,7 +634,7 @@ static bool bfq_differentiated_weights(struct bfq_data *bfqd) * The following function returns true if every queue must receive the * same share of the throughput (this condition is used when deciding * whether idling may be disabled, see the comments in the function - * bfq_bfqq_may_idle()). + * bfq_better_to_idle()). * * Such a scenario occurs when: * 1) all active queues have the same weight, @@ -3355,7 +3355,7 @@ static bool bfq_may_expire_for_budg_timeout(struct bfq_queue *bfqq) * issues taken into account are not trivial. We discuss these issues * individually while introducing the variables. */ -static bool bfq_bfqq_may_idle(struct bfq_queue *bfqq) +static bool bfq_better_to_idle(struct bfq_queue *bfqq) { struct bfq_data *bfqd = bfqq->bfqd; bool rot_without_queueing = @@ -3588,19 +3588,19 @@ static bool bfq_bfqq_may_idle(struct bfq_queue *bfqq) } /* - * If the in-service queue is empty but the function bfq_bfqq_may_idle + * If the in-service queue is empty but the function bfq_better_to_idle * returns true, then: * 1) the queue must remain in service and cannot be expired, and * 2) the device must be idled to wait for the possible arrival of a new * request for the queue. - * See the comments on the function bfq_bfqq_may_idle for the reasons + * See the comments on the function bfq_better_to_idle for the reasons * why performing device idling is the best choice to boost the throughput - * and preserve service guarantees when bfq_bfqq_may_idle itself + * and preserve service guarantees when bfq_better_to_idle itself * returns true. */ static bool bfq_bfqq_must_idle(struct bfq_queue *bfqq) { - return RB_EMPTY_ROOT(&bfqq->sort_list) && bfq_bfqq_may_idle(bfqq); + return RB_EMPTY_ROOT(&bfqq->sort_list) && bfq_better_to_idle(bfqq); } /* @@ -3686,7 +3686,7 @@ static struct bfq_queue *bfq_select_queue(struct bfq_data *bfqd) * may idle after their completion, then keep it anyway. */ if (bfq_bfqq_wait_request(bfqq) || - (bfqq->dispatched != 0 && bfq_bfqq_may_idle(bfqq))) { + (bfqq->dispatched != 0 && bfq_better_to_idle(bfqq))) { bfqq = NULL; goto keep_queue; } @@ -4734,7 +4734,7 @@ static void bfq_completed_request(struct bfq_queue *bfqq, struct bfq_data *bfqd) BFQQE_BUDGET_TIMEOUT); else if (RB_EMPTY_ROOT(&bfqq->sort_list) && (bfqq->dispatched == 0 || - !bfq_bfqq_may_idle(bfqq))) + !bfq_better_to_idle(bfqq))) bfq_bfqq_expire(bfqd, bfqq, false, BFQQE_NO_MORE_REQUESTS); }