From patchwork Wed Nov 2 12:39:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yuwei Guan X-Patchwork-Id: 13028081 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 53D32C4332F for ; Wed, 2 Nov 2022 12:40:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230388AbiKBMkO (ORCPT ); Wed, 2 Nov 2022 08:40:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230395AbiKBMkN (ORCPT ); Wed, 2 Nov 2022 08:40:13 -0400 Received: from mail-pg1-x52a.google.com (mail-pg1-x52a.google.com [IPv6:2607:f8b0:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2B5B29C91; Wed, 2 Nov 2022 05:40:12 -0700 (PDT) Received: by mail-pg1-x52a.google.com with SMTP id v3so1183430pgh.4; Wed, 02 Nov 2022 05:40:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=iW88jGgcd8miZh9len9gFIPIDgHa/+wXKZJwZCVeRuM=; b=ExliLNWM8833uTSn3Iu6fujG7/iOfccABTOCt2AEe247j443amawJXh+Xx7pyL3KsY VPWaxX8NxWIdI2MSJwVYuv9b70dZnIA3lZYtYTYH0QaDWpTx8SIHa/ghkH3+gbNc1twN Mpq5JxeOnhAUEKXgu+UXbvcgQ7rrJylURkGoWxlE9wZs/Jpi+h8Qmyw7CXu//Fl5u44p GCxt7oHqL2N81IL7p8QOF+0icEBrthabDI0rfyOAGObQZKgGyff+2WH9k8QyPtFdItOc 1ovf7Y6cpqRjvAVSv87LAP9MdYyoKusKbh3sz8L2Dnbq49meRhLFZISNcO4Q0ZeTKj8V e4Ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iW88jGgcd8miZh9len9gFIPIDgHa/+wXKZJwZCVeRuM=; b=MoP2468dQBNnLVjSy6liWC0Sfao+ZC7u+eY3ZXjMT3CWrkxdsmMKtmo3LLRHXE7aQp VduJl3JTraVb+uRj1Q+p8l2TTvlSTY6Ubv3uinYpr+HDzTaYALvYE7rEKxF+CoZiVc0d 7EjvmvoGYW7/Hpk6QBzjA38gkNxmJSD0sss2QexPS/r0i7t+Maag7ygQPtELU9Oa4QeT Xtg78deZpfz9KyzQWFjZwpL/rb79qY00U6kn6XVA5xE2JfcGga+vfMO7InqcNxlX3Q35 vQqXFaHUEUumojwo47knf+YHuUrtc1eGDbCnf1O1SLJyMhArc1qHAaqiTeLxQE9YkFsF jVWw== X-Gm-Message-State: ACrzQf1KeoNDQu94aDyjqrRDDkOzX8EAd37i1ZRDHMz6r0klRysVDYTV pmiDPwEBy3M2Ro+xpAqR+iE= X-Google-Smtp-Source: AMsMyM6fD3HjuK76WyqWIIdJLo6fTR9y9MLBvXLcsnGTiuYT3SzPQ1MVPJ3giy4fUdRVPmUbac0/Hw== X-Received: by 2002:a05:6a00:2409:b0:54e:a3ad:d32d with SMTP id z9-20020a056a00240900b0054ea3add32dmr24822988pfh.70.1667392812356; Wed, 02 Nov 2022 05:40:12 -0700 (PDT) Received: from Zbook.localdomain ([129.227.152.6]) by smtp.gmail.com with ESMTPSA id f19-20020aa79693000000b0056c003f9169sm8339360pfk.196.2022.11.02.05.40.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Nov 2022 05:40:11 -0700 (PDT) From: Yuwei Guan X-Google-Original-From: Yuwei Guan To: paolo.valente@linaro.org, axboe@kernel.dk Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Yuwei.Guan@zeekrlife.com Subject: [PATCH 1/5] block, bfq: remove unnecessary value print Date: Wed, 2 Nov 2022 20:39:52 +0800 Message-Id: <20221102123956.230-2-Yuwei.Guan@zeekrlife.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221102123956.230-1-Yuwei.Guan@zeekrlife.com> References: <20221102123956.230-1-Yuwei.Guan@zeekrlife.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org "peak_rate_samples" is 0 alway when do first dispatch from last reset, so no need to print it's value. Signed-off-by: Yuwei Guan --- block/bfq-iosched.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c index 7ea427817f7f..7a15b2689cb8 100644 --- a/block/bfq-iosched.c +++ b/block/bfq-iosched.c @@ -3573,8 +3573,7 @@ static void bfq_update_peak_rate(struct bfq_data *bfqd, struct request *rq) u64 now_ns = ktime_get_ns(); if (bfqd->peak_rate_samples == 0) { /* first dispatch */ - bfq_log(bfqd, "update_peak_rate: goto reset, samples %d", - bfqd->peak_rate_samples); + bfq_log(bfqd, "update_peak_rate: goto reset"); bfq_reset_rate_computation(bfqd, rq); goto update_last_values; /* will add one sample */ } From patchwork Wed Nov 2 12:39:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yuwei Guan X-Patchwork-Id: 13028082 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 64239C433FE for ; Wed, 2 Nov 2022 12:40:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230419AbiKBMkS (ORCPT ); Wed, 2 Nov 2022 08:40:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230427AbiKBMkQ (ORCPT ); Wed, 2 Nov 2022 08:40:16 -0400 Received: from mail-pg1-x534.google.com (mail-pg1-x534.google.com [IPv6:2607:f8b0:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EEC6A29C96; Wed, 2 Nov 2022 05:40:15 -0700 (PDT) Received: by mail-pg1-x534.google.com with SMTP id e129so16123308pgc.9; Wed, 02 Nov 2022 05:40:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ed7Wml//j7Y9RMu6dwoeo3Qg5iNedwfaG5B6AyQm750=; b=gAanQ/I5GZWf/GD2GgUisok3GodxFb+eps6OU6Z/4JyUQaaYCuWdK6WEsDbnBOLtkD vDGapcAhYw+6EoKuyzJYmbtSpHdV8MCPUKPATDWF3ilMXEwPDMfl5KiO+wy05QMrxkpl 4L+HVD5kYAJXYcRVhkrowzyvjIwNT5PtJqrMwCHgWy6WBniWMum5yF7pBtleVo7ZdGcg 9+p0p5HB1zc2ZD3Babl5Zpz1001sAAJMTEuwHSNQhHZpygOHGb2LmmDoWPnGYTVzVGtI icU5SKNrrQNAWxUQJLpHwMAkO0TVef1lrm72o8++DYCWataDe11wi/z70n9ajbdPReq8 6fRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ed7Wml//j7Y9RMu6dwoeo3Qg5iNedwfaG5B6AyQm750=; b=Td5NTDVhZ5OvjBv67oz0df95ZRsHqks9Lvb+NmIBQ7f8rKAGEM05DQWuRorCVgYAaJ lqlAfF+WAC9UR7AnUXiOqfeeXpg3u3xmaHAMfIEGqcOBCQwMslM51Vyu4wcl/cT+aHd+ PLdW0hEB/pJCyF1oY1793EIJCbkFjgVzZevxNShBg58LlX3UXkDSkOJPzTaxveeNSuPz JK1eJ9PTNBWK57IUDOnQr0s61LnxPvWkcrOGHR79QI1b6ZBhP4S/hj9k4NqNyHXCAvoI xbJMUZKYGH8baVwg7ZUX/vNUDw+AsTmvXxkpzGQT8+nFMPvKDpeRWUZ8LwgdYM6jSGNq Sl0g== X-Gm-Message-State: ACrzQf1+Cw1pNfhf9iClOa2+Zv+UvBuxM8j6TyLlDAzSG0QdYiCdJnRL TrZAazHFbBg+krmqn9K0HKM= X-Google-Smtp-Source: AMsMyM5iOWdV2pPfyqmRrmntgtuRBc+0iKBhJE/t8V/GOwvmmrjb57B92hIyvaFthfSLBoCHCs48iQ== X-Received: by 2002:a63:da4f:0:b0:43f:6af:74ed with SMTP id l15-20020a63da4f000000b0043f06af74edmr22039169pgj.290.1667392815462; Wed, 02 Nov 2022 05:40:15 -0700 (PDT) Received: from Zbook.localdomain ([129.227.152.6]) by smtp.gmail.com with ESMTPSA id f19-20020aa79693000000b0056c003f9169sm8339360pfk.196.2022.11.02.05.40.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Nov 2022 05:40:15 -0700 (PDT) From: Yuwei Guan X-Google-Original-From: Yuwei Guan To: paolo.valente@linaro.org, axboe@kernel.dk Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Yuwei.Guan@zeekrlife.com Subject: [PATCH 2/5] block, bfq: do bfq_set_next_ioprio_data() after setting sync mode and pid Date: Wed, 2 Nov 2022 20:39:53 +0800 Message-Id: <20221102123956.230-3-Yuwei.Guan@zeekrlife.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221102123956.230-1-Yuwei.Guan@zeekrlife.com> References: <20221102123956.230-1-Yuwei.Guan@zeekrlife.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org Do bfq_set_next_ioprio_data() after setting sync mode and pid for bfqq in bfq_init_bfqq(), which can print real pid and sync info for bfq_log_bfqq log in bfq_set_next_ioprio_data(). such as, before: "bfq0A new_ioprio 4 new_weight 40" after: "bfq203S new_ioprio 4 new_weight 40" Signed-off-by: Yuwei Guan --- block/bfq-iosched.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c index 7a15b2689cb8..e00c67a01b09 100644 --- a/block/bfq-iosched.c +++ b/block/bfq-iosched.c @@ -5509,9 +5509,6 @@ static void bfq_init_bfqq(struct bfq_data *bfqd, struct bfq_queue *bfqq, bfqq->ref = 0; bfqq->bfqd = bfqd; - if (bic) - bfq_set_next_ioprio_data(bfqq, bic); - if (is_sync) { /* * No need to mark as has_short_ttime if in @@ -5537,6 +5534,9 @@ static void bfq_init_bfqq(struct bfq_data *bfqd, struct bfq_queue *bfqq, bfqq->pid = pid; + if (bic) + bfq_set_next_ioprio_data(bfqq, bic); + /* Tentative initial value to trade off between thr and lat */ bfqq->max_budget = (2 * bfq_max_budget(bfqd)) / 3; bfqq->budget_timeout = bfq_smallest_from_now(); From patchwork Wed Nov 2 12:39:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yuwei Guan X-Patchwork-Id: 13028083 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5FC73C433FE for ; Wed, 2 Nov 2022 12:40:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231146AbiKBMkl (ORCPT ); Wed, 2 Nov 2022 08:40:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230480AbiKBMkd (ORCPT ); Wed, 2 Nov 2022 08:40:33 -0400 Received: from mail-pg1-x533.google.com (mail-pg1-x533.google.com [IPv6:2607:f8b0:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88F2F2A437; Wed, 2 Nov 2022 05:40:20 -0700 (PDT) Received: by mail-pg1-x533.google.com with SMTP id g129so16139365pgc.7; Wed, 02 Nov 2022 05:40:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bmz9MTfv7lI1QNkjbbI4jecKBOC8rkshqDZ/E0vCsJc=; b=VeibVBTCfMdN+FVmc77EkVwhtydUW+tXJU6+/gq5kBBejmiwThQHVdVTHpEsALCI7H x733cOcn18jFNKXQ2kcNwtBDW4wiJYmq9z3iG+f5UPvQuVAS0YIPhYvv0GnTZ/eaIMce udgQPUa3L45A+YexMe3OiWyegkzQfGfjmprH8MtlCTR1OlpWcaZElaqq2/5LSgkcBC6M EPtCQlLpdRYVBCO+JzosERkPqEsXHZ91mggqfeFeJUcHgPjiMT3UKhkauTtzk3FjNlLr m39zbW/A+mWGMM/qRwJuKhQKpMxMEC2ZSTYiQzyRMH1QXwLcY5QhnsJrR0ixU2zk5BBV VgMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bmz9MTfv7lI1QNkjbbI4jecKBOC8rkshqDZ/E0vCsJc=; b=QOdilwzbCB6AKnCZHnViq65f/JeR42LM0sLNy1kBbTvhXVJ1jI2rdphj3AGWfy88sC hyiycZGBIRVEIXTzVSfs1qUx1SUJMJw5ufLiU2+WtUQOXRMS4fPVD15l0y2Cr/6Fm+Q9 Fl9zam5Z0u+kZH8P2GEZFrfH5xmqXFNvX5Dy4LLboAJU6Z/i5kfsWI9jDUjfNEfBivQf TmMaJQEGlEJdOEgdQiJz3Yx7snkTLJLOHCjH2agDydXvw6sAPr058R7VHF/g57zj7jy2 OVqOKE6G+asKwY2QHm6RpHuXIIolmp8Mc/RzYCl7GYiageTKOO31eSMiGRc86H2Q8PcY VSNw== X-Gm-Message-State: ACrzQf0q20sNafLW7PT4PxQNOpalI2r/+DMF2fUZHSD1mXJOZc0s50CP D2+FhgFt3HiDh8ztmf5Ghe+OgU5xfCG7tPne X-Google-Smtp-Source: AMsMyM4lAYlAp8vytn6N/m4wsYjsRHrDho15t7weJvyNoCvd4E9lT4ezoA4hfCFoE3jtpymg3qOpYA== X-Received: by 2002:a63:187:0:b0:43b:cf3c:c64d with SMTP id 129-20020a630187000000b0043bcf3cc64dmr21227922pgb.359.1667392819177; Wed, 02 Nov 2022 05:40:19 -0700 (PDT) Received: from Zbook.localdomain ([129.227.152.6]) by smtp.gmail.com with ESMTPSA id f19-20020aa79693000000b0056c003f9169sm8339360pfk.196.2022.11.02.05.40.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Nov 2022 05:40:18 -0700 (PDT) From: Yuwei Guan X-Google-Original-From: Yuwei Guan To: paolo.valente@linaro.org, axboe@kernel.dk Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Yuwei.Guan@zeekrlife.com Subject: [PATCH 3/5] block, bfq: don't convert pid type in bfq_log_bfqq() Date: Wed, 2 Nov 2022 20:39:54 +0800 Message-Id: <20221102123956.230-4-Yuwei.Guan@zeekrlife.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221102123956.230-1-Yuwei.Guan@zeekrlife.com> References: <20221102123956.230-1-Yuwei.Guan@zeekrlife.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org Don't convert pid type in bfq_log_bfqq() Signed-off-by: Yuwei Guan --- block/bfq-iosched.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c index e00c67a01b09..9c626fba41c8 100644 --- a/block/bfq-iosched.c +++ b/block/bfq-iosched.c @@ -3109,8 +3109,7 @@ static void bfq_merge_bfqqs(struct bfq_data *bfqd, struct bfq_io_cq *bic, struct bfq_queue *bfqq, struct bfq_queue *new_bfqq) { - bfq_log_bfqq(bfqd, bfqq, "merging with queue %lu", - (unsigned long)new_bfqq->pid); + bfq_log_bfqq(bfqd, bfqq, "merging with queue %d", new_bfqq->pid); /* Save weight raising and idle window of the merged queues */ bfq_bfqq_save_state(bfqq); bfq_bfqq_save_state(new_bfqq); From patchwork Wed Nov 2 12:39:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yuwei Guan X-Patchwork-Id: 13028084 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 907D0C4332F for ; Wed, 2 Nov 2022 12:40:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230509AbiKBMkr (ORCPT ); Wed, 2 Nov 2022 08:40:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231171AbiKBMkh (ORCPT ); Wed, 2 Nov 2022 08:40:37 -0400 Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3252B2A254; Wed, 2 Nov 2022 05:40:23 -0700 (PDT) Received: by mail-pf1-x433.google.com with SMTP id i3so16265507pfc.11; Wed, 02 Nov 2022 05:40:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XWycHaP8mfKxEznoLfJrfhCyqFQA+DINLzwU4BVGVxk=; b=Vjz6n77GwFrjTad3BeT91Wjt9YM/ZuHb/Ihplqu7Quq40BkVDlbSXLkn7IGbIEwTJd WIMpL3Nla3r0fZ+BqFRPC8liWRTn/03ai1RK4lOrYcR8lpTLISCbHi/hzjq/K5lY8Lxh YBHY0Kv4f2eFOSIkqYHMiYlQyNFjJsVadJ0YyWbgU8V7jYNanDRspS2SLiCu83lIEymE sgzAZs/HBhERYNmbcNYfGdP/nkZgYrRxxyRB30yKe1p+PaSsOqQnhbotmUqEXJf/JdC3 1XsaKzluGl8R1u7G6w2z/R9pCik9nWdnnMlgYgBFB6/SCCVovyj0vTX8Bg3H5uIP3AM5 VHVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XWycHaP8mfKxEznoLfJrfhCyqFQA+DINLzwU4BVGVxk=; b=CcYlAy+iHjkRc3BcOCZ3xszBC0z0FHg23TbrdoUZxMepIohwLY3pZMDhRj13w+UW89 irSy3mUadsEDXEwct0BOID96B/IKAvihzyRXDapPuqz1vpwCmAH0K8vFaZ4Pd88bpkng Qdene8cp/CZtTqdty7acE/Pzze5xQjyl7Tgikqk+hv0gpW/0qmalFZVR1nSo1Vx1G5fH HHAHXPysos2TnP2+t2UzzhidhnCrTlC7Z2AsNJ0e7h+OZlJ0AgwESI1zW6DMXQdjaTXv ur//F69eOjt0dL/cIgQefxbZdde/r2xpcmfyfZIYNHM+sUuWXtI2qaxq8opNU1thLu4r 8qmQ== X-Gm-Message-State: ACrzQf0TOHAQZmNUphUnz5PyvBITh/ieqbxOo4YO3nt+kkrTY3fkjl2C MAEI1B+fyI6eLXpp8aMggyPtj0rq+2Hg2D3y X-Google-Smtp-Source: AMsMyM6+peOYHtwZjDWKqsEc76ZhDpUihRXvTF1OtSrg2x70YIx+HB/0VsHCP9OFhoKDCBnafaeWJA== X-Received: by 2002:a05:6a00:1152:b0:56c:dd9c:da94 with SMTP id b18-20020a056a00115200b0056cdd9cda94mr24949120pfm.66.1667392822584; Wed, 02 Nov 2022 05:40:22 -0700 (PDT) Received: from Zbook.localdomain ([129.227.152.6]) by smtp.gmail.com with ESMTPSA id f19-20020aa79693000000b0056c003f9169sm8339360pfk.196.2022.11.02.05.40.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Nov 2022 05:40:22 -0700 (PDT) From: Yuwei Guan X-Google-Original-From: Yuwei Guan To: paolo.valente@linaro.org, axboe@kernel.dk Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Yuwei.Guan@zeekrlife.com Subject: [PATCH 4/5] block, bfq: change "secs" to "sects" for bfq log in bfq_bfqq_served() Date: Wed, 2 Nov 2022 20:39:55 +0800 Message-Id: <20221102123956.230-5-Yuwei.Guan@zeekrlife.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221102123956.230-1-Yuwei.Guan@zeekrlife.com> References: <20221102123956.230-1-Yuwei.Guan@zeekrlife.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org Let "sects" short for sectors, as "secs" is reminiscent of seconds. Signed-off-by: Yuwei Guan --- block/bfq-wf2q.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/bfq-wf2q.c b/block/bfq-wf2q.c index 8fc3da4c23bb..f57ed0b037f3 100644 --- a/block/bfq-wf2q.c +++ b/block/bfq-wf2q.c @@ -823,7 +823,7 @@ void bfq_bfqq_served(struct bfq_queue *bfqq, int served) st->vtime += bfq_delta(served, st->wsum); bfq_forget_idle(st); } - bfq_log_bfqq(bfqq->bfqd, bfqq, "bfqq_served %d secs", served); + bfq_log_bfqq(bfqq->bfqd, bfqq, "bfqq_served %d sects", served); } /** From patchwork Wed Nov 2 12:39:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yuwei Guan X-Patchwork-Id: 13028085 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1AE8AC4332F for ; Wed, 2 Nov 2022 12:40:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230500AbiKBMkv (ORCPT ); Wed, 2 Nov 2022 08:40:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230526AbiKBMkj (ORCPT ); Wed, 2 Nov 2022 08:40:39 -0400 Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A25EE2A247; Wed, 2 Nov 2022 05:40:26 -0700 (PDT) Received: by mail-pg1-x52d.google.com with SMTP id r18so16101667pgr.12; Wed, 02 Nov 2022 05:40:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xe5a5Ru1/XT66dpFkqWwNZmEbEp5/a1fNwas3qwNPCU=; b=fvAtYKUe/Ychvwzd3I6de24IsN9RvsNMpvWnbYipWTg9V/fFoanLqa14uuE+ntvDWK h8mU0mz+E4mGizz4oj/RxVnY2IbPW6+/YCesr865G//rNRjEdiMaa8+U23s3W6TG7RgL e17kyY0mdJ2CwVGAmxuqHp4AGc+Br+VwqwQLQnad4QqHzcvDbvjvCVG31SV++RcVkDuW aZP6F9oShASUvqHGDGj8TVH0tqbIIyhmGrRozBtvBnR4NsiGWdXzWnPCEO5KIisMI97n BRw3mfUf/zrLRnjW6/nK7HrOn1yw4qLtZrjqwh40+R+0KMEapx5P0Y5HwHrPw2cbSipH XPIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xe5a5Ru1/XT66dpFkqWwNZmEbEp5/a1fNwas3qwNPCU=; b=cvu8wp5Z8kvKo9IFFdtVnxmqmck+1kjyRmjJbxtV0vthww7eGzeJbiBLSOl83KF9MI xYrg+6Zdl/XpRxD9lE5Lb5I+mTiZ2qTtd7ZH6w8xxKfmfGk+tKddzBTfSxa/mF5QseV0 tyYMkRbBE1sd8Kn9il2C/urmPuoXo2fPj4bqR8QBZ8FzGmyeBe1KfixZ5kAhsG8k5zce cljs+4l09K44C/7fP8O/dXaUgq/9VQM4DXKCS6yjuqEORfrws1QOQFJHfEhLKQ0ruG1p pdV/+7eNknzlywlhyl8qfHdc7TaB6+425HxLWcLYaUaC7EnEs5bn16zhuCMuSWeBNdS3 ukrg== X-Gm-Message-State: ACrzQf0EhLfM+wZPaOsDsftk4rShRqVNB3rrwm1FX8WIb5lI7Ck4hlBA cMf9q7u7nKri7ff7ZeJV3fQ= X-Google-Smtp-Source: AMsMyM5MCQt8YBiAHYQm8dtgMBBm25GSFqCMceamsEH0a5pp0vWc93EyVnrzHmyWsvpdMYABjKxCYg== X-Received: by 2002:a63:24d:0:b0:452:87c1:9781 with SMTP id 74-20020a63024d000000b0045287c19781mr21723627pgc.512.1667392826161; Wed, 02 Nov 2022 05:40:26 -0700 (PDT) Received: from Zbook.localdomain ([129.227.152.6]) by smtp.gmail.com with ESMTPSA id f19-20020aa79693000000b0056c003f9169sm8339360pfk.196.2022.11.02.05.40.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Nov 2022 05:40:25 -0700 (PDT) From: Yuwei Guan X-Google-Original-From: Yuwei Guan To: paolo.valente@linaro.org, axboe@kernel.dk Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Yuwei.Guan@zeekrlife.com Subject: [PATCH 5/5] block, bfq: print bfqq addr for each bfq_log_bfqq log Date: Wed, 2 Nov 2022 20:39:56 +0800 Message-Id: <20221102123956.230-6-Yuwei.Guan@zeekrlife.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221102123956.230-1-Yuwei.Guan@zeekrlife.com> References: <20221102123956.230-1-Yuwei.Guan@zeekrlife.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org Print bfqq addr for each bfq_log_bfqq log, which can improve readability of bfq log. Signed-off-by: Yuwei Guan --- block/bfq-iosched.c | 15 +++++++-------- block/bfq-iosched.h | 4 +++- block/bfq-wf2q.c | 3 +-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c index 9c626fba41c8..432c5337d7c2 100644 --- a/block/bfq-iosched.c +++ b/block/bfq-iosched.c @@ -5253,7 +5253,7 @@ void bfq_put_queue(struct bfq_queue *bfqq) struct hlist_node *n; struct bfq_group *bfqg = bfqq_group(bfqq); - bfq_log_bfqq(bfqq->bfqd, bfqq, "put_queue: %p %d", bfqq, bfqq->ref); + bfq_log_bfqq(bfqq->bfqd, bfqq, "put_queue: ref %d", bfqq->ref); bfqq->ref--; if (bfqq->ref) @@ -5356,7 +5356,7 @@ static void bfq_exit_bfqq(struct bfq_data *bfqd, struct bfq_queue *bfqq) bfq_schedule_dispatch(bfqd); } - bfq_log_bfqq(bfqd, bfqq, "exit_bfqq: %p, %d", bfqq, bfqq->ref); + bfq_log_bfqq(bfqd, bfqq, "exit_bfqq: ref %d", bfqq->ref); bfq_put_cooperator(bfqq); @@ -5772,8 +5772,8 @@ static struct bfq_queue *bfq_get_queue(struct bfq_data *bfqd, * guarantee that this queue is not freed * until its group goes away. */ - bfq_log_bfqq(bfqd, bfqq, "get_queue, bfqq not in async: %p, %d", - bfqq, bfqq->ref); + bfq_log_bfqq(bfqd, bfqq, "get_queue, bfqq not in async: ref %d", + bfqq->ref); *async_bfqq = bfqq; } @@ -6803,8 +6803,8 @@ static struct bfq_queue *bfq_init_rq(struct request *rq) bfqq_request_allocated(bfqq); bfqq->ref++; bic->requests++; - bfq_log_bfqq(bfqd, bfqq, "get_request %p: bfqq %p, %d", - rq, bfqq, bfqq->ref); + bfq_log_bfqq(bfqd, bfqq, "get_request %p: bfqq ref %d", + rq, bfqq->ref); rq->elv.priv[0] = bic; rq->elv.priv[1] = bfqq; @@ -6936,8 +6936,7 @@ static void __bfq_put_async_bfqq(struct bfq_data *bfqd, if (bfqq) { bfq_bfqq_move(bfqd, bfqq, bfqd->root_group); - bfq_log_bfqq(bfqd, bfqq, "put_async_bfqq: putting %p, %d", - bfqq, bfqq->ref); + bfq_log_bfqq(bfqd, bfqq, "put_async_bfqq: ref %d", bfqq->ref); bfq_put_queue(bfqq); *bfqq_ptr = NULL; } diff --git a/block/bfq-iosched.h b/block/bfq-iosched.h index 71f721670ab6..8851ffcb7a0d 100644 --- a/block/bfq-iosched.h +++ b/block/bfq-iosched.h @@ -24,7 +24,7 @@ #define BFQ_DEFAULT_GRP_IOPRIO 0 #define BFQ_DEFAULT_GRP_CLASS IOPRIO_CLASS_BE -#define MAX_BFQQ_NAME_LENGTH 16 +#define MAX_BFQQ_NAME_LENGTH 32 /* * Soft real-time applications are extremely more latency sensitive @@ -1090,6 +1090,8 @@ static inline void bfq_bfqq_name(struct bfq_queue *bfqq, char *str, int len) snprintf(str, len, "bfq%d%c", bfqq->pid, type); else snprintf(str, len, "bfqSHARED-%c", type); + + snprintf(str, len, "%s %p", str, bfqq); } #ifdef CONFIG_BFQ_GROUP_IOSCHED diff --git a/block/bfq-wf2q.c b/block/bfq-wf2q.c index f57ed0b037f3..7ab4094af35a 100644 --- a/block/bfq-wf2q.c +++ b/block/bfq-wf2q.c @@ -513,8 +513,7 @@ static void bfq_get_entity(struct bfq_entity *entity) if (bfqq) { bfqq->ref++; - bfq_log_bfqq(bfqq->bfqd, bfqq, "get_entity: %p %d", - bfqq, bfqq->ref); + bfq_log_bfqq(bfqq->bfqd, bfqq, "get_entity: ref %d", bfqq->ref); } }