Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp511982lqs; Thu, 13 Jun 2024 18:09:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWcoOztXf2HtVLTbFrKgKedKrRnsZWwBHihIMd0QkkcT1MmAarzoqKXwFMJK0L5sZ0nTcAVkOyQeGRZ+iz6z0Kpntfrkf8B8tlA+YjT5Q== X-Google-Smtp-Source: AGHT+IGJwaWjlnPRQOAIhO3/LL7GD1UmKy/iyAZ2AMUzh4pqjsyuBQ2OhbVeQXkOPUp3DCNNY3AU X-Received: by 2002:a05:6a00:2f97:b0:704:34a0:96c9 with SMTP id d2e1a72fcca58-705d71cf788mr1281098b3a.30.1718327386936; Thu, 13 Jun 2024 18:09:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718327386; cv=pass; d=google.com; s=arc-20160816; b=gQyH0ByTkv+izP1iPrJaT74GneGh5YR7IrQlvY/xlzJceZ9sd4dtmGPmMw0TUhoq+Z TTrdmT3gx56/I/Nw158p0BExhZOB5FubeCb3+VDEHqevZhVR5FvKalOPW8/2GkivFFiL BY+FwDs7byK/LGkgCf1aTpD2AOLR9vDEgpZtllt4VuOfRh541ppKjwR76vk+W9s/fbbi BwGfWsigDVsetMxsI03cjr+WiAaaVJEsOdCmSp6a7N59YvHpjEmdX/zPcK7EtX7UY5AK xqwMLQIYAG1jSHgw8ws5XLCw59VvoTZIR2AYdhJ0fjHxtGbz/poPXdCo0CT0ZuDfMhvB ISTw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:user-agent:date:message-id:from :references:cc:to:subject; bh=K7GgqUolfiJYhj5rdcL8S/rH4Z8mtQ2pVdRefdSOMcs=; fh=5xAy1HDcmjmMnkeWb+EdLgNRIv53H0bQUShu8g9I0P8=; b=s09r8/lNrLUvT+uxYrhZssJ5JGdpMzaRZg96ypdjSxC28gVXvG0EjowjYIxyYKtqu0 aoGIv4XsYiP6h08t6rnhZZjkwCtRQ+mwI5wI3iIOLQGVH/iIA7d1tSSVDMZywpOAbA8C 2HLQ60jHkuCtSkFDPOuub2hQRVuNwyYI+L1TTF3t/jpn0jcr39c/dPq60SPUwWwYAO9g 0hBIWj9A7Z3vQXW/+soEzlmFDAdwf3e9AZHnzYw1IawB8LSc4GiXuCjEwDyRMFIP64oj WzdpRaZQsd7YvCRMkuArn1Oz9UJTNkneQdREoamCYTgQFDWwP7OUpD/XGIeTPZ+Lx3MH cQJw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huaweicloud.com); spf=pass (google.com: domain of linux-kernel+bounces-214172-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214172-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d2e1a72fcca58-705cc8f782fsi2525184b3a.37.2024.06.13.18.09.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 18:09:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-214172-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huaweicloud.com); spf=pass (google.com: domain of linux-kernel+bounces-214172-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-214172-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id F2278B226AD for ; Fri, 14 Jun 2024 01:07:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EF2E0158D78; Fri, 14 Jun 2024 01:07:12 +0000 (UTC) Received: from dggsgout11.his.huawei.com (unknown [45.249.212.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D0178157E7D; Fri, 14 Jun 2024 01:07:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718327232; cv=none; b=JdlSymMPzaXm5v39j4Cpe2SwvRbCf5frMjvV5RBVu4XeriNa62bdOb4ovl8vWhKFrl29P1mBdLlYhRH3yVJJuWgdiuVNmx1d4kla3UKN6nCl4SbtI9CSSBStmFjFDS+WDLPm/NVw1cZuou91dOyFWUzoJDoaHUtiLCJYufcCVno= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718327232; c=relaxed/simple; bh=2tC/fV53SlYxr1+Tb0Q8m2wjAfrkmL7OuJnZr23PIcI=; h=Subject:To:Cc:References:From:Message-ID:Date:MIME-Version: In-Reply-To:Content-Type; b=bflDOy65M6cJWLNCLlk6rNt+vt51vQzbGYFC08e13BaYKsVuyCtYDOd1IBV6/FoI0tpportg4FzaVHE6Ti5OWqsZIi0AL8t7IRuvzwOF/Bwwu5DXlIGAt439cjNEtdZAzmE6avIrM/WXmGAhTo3YbQ1deIbpIipPQvRMBgE8IAg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com; spf=pass smtp.mailfrom=huaweicloud.com; arc=none smtp.client-ip=45.249.212.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huaweicloud.com Received: from mail.maildlp.com (unknown [172.19.93.142]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4W0h262P9Fz4f3mHq; Fri, 14 Jun 2024 09:06:54 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.112]) by mail.maildlp.com (Postfix) with ESMTP id D76B71A0185; Fri, 14 Jun 2024 09:07:05 +0800 (CST) Received: from [10.174.176.73] (unknown [10.174.176.73]) by APP1 (Coremail) with SMTP id cCh0CgBnOBG3l2tmQXutPQ--.44541S3; Fri, 14 Jun 2024 09:07:05 +0800 (CST) Subject: Re: [PATCH RFC -next 0/7] blk-iocost: support to build iocost as kernel module To: Bart Van Assche , Greg KH , Yu Kuai Cc: axboe@kernel.dk, tj@kernel.org, josef@toxicpanda.com, lizefan.x@bytedance.com, hannes@cmpxchg.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, yi.zhang@huawei.com, yangerkun@huawei.com, "yukuai (C)" References: <20240613014937.1326020-1-yukuai1@huaweicloud.com> <2024061342-walk-cavalier-7e48@gregkh> <97a2b888-4dac-451c-bb9c-40d8dc52cd60@acm.org> From: Yu Kuai Message-ID: <6bfbe267-8a75-486c-877b-e3236cddfa93@huaweicloud.com> Date: Fri, 14 Jun 2024 09:07:03 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <97a2b888-4dac-451c-bb9c-40d8dc52cd60@acm.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-CM-TRANSID:cCh0CgBnOBG3l2tmQXutPQ--.44541S3 X-Coremail-Antispam: 1UD129KBjvdXoW7XF1DKFWUZw15CFWrCw1Utrb_yoWDWFgEv3 Z5ZFyjqryx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12/24 10:54 PM, Greg KH wrote: >> On Thu, Jun 13, 2024 at 09:49:30AM +0800, Yu Kuai wrote: >>> From: Yu Kuai >>> >>> Yu Kuai (7): >>>    kernfs: export pr_cont_kernfs_path() >>>    cgroup: export cgroup_parse_float >>>    block: export some API >>>    blk-iocost: factor out helpers to handle params from ioc_qos_write() >>>    blk-iocost: parse params before initializing iocost >>>    blk-iocost: support to free iocost >>>    blk-iocost: support to build iocost as kernel module >> >> No where do you say _why_ building this as a module is a good idea. >> >> Why do this at all? > > With CONFIG_BLK_CGROUP_IOCOST=y (as in the Android kernel), the > blk-iocost kernel module causes a (small) runtime overhead, even if it > is not being used. I think this is not true... Because iocost is lazy initialized, and if iocost is not initialized, there should not be such overhead. Thanks, Kuai > > Thanks, > > Bart. > > > . >