Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3636302pxb; Mon, 1 Feb 2021 00:03:15 -0800 (PST) X-Google-Smtp-Source: ABdhPJwthBA4btT8cZSDSbmvyGSXRE+2rb8VKyj40acUaP9KPzgn5ikMFYntkMQCgeyGMc0joPdH X-Received: by 2002:aa7:d4d7:: with SMTP id t23mr17305082edr.321.1612166595313; Mon, 01 Feb 2021 00:03:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612166595; cv=none; d=google.com; s=arc-20160816; b=QCNZZOesQ6cyt0FjfOkfWhr2jKwvqeAoP97rW8RT15ykkv9WIq60EMfDQJYDR73zH/ ep4g9MLqybs5lnk03+IU/4XfwxwMv23oDgCuahbFGPUgFJI4BLXe8eOwBCQWPVPilgfL t+XXv3Ky9uZlmrq/Wh581fouXbS+LdWyX/li2zGdCW9RQaUnOGsEM9s7+7yym9qiyn4/ fnx3xXXkP0cce0iWKLEKOK1rMlM2gYqD71tXQ/0sqB+lfqLP2CG6Z5RsKZzJaXoMcc1u V1dEkx5eHg61095HIbXpfw6cOblUHk2BPuhlgWT6l26RSYW0a18Zmpy2Jqc2pQNY7M6v w5lA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=XlKA8W75HYnTMrtPPmZBsspe0707wlbjVwJj2Nz+dPA=; b=WrClbx+9cLe5WeDxZg/df8C/AkcqmLY5y37bIVSSE5oOPxJ8duJkDas51Kxem45BiX DZlIeP0BH+pXG0gdXmTHAWK1c5lDW7SsJxdwZ5UspsZmX37KdVoUlSsaAcFcj+N39ZBz Kv4BYhDwkoX7BOyZ7neixCgzxOrywXEjO4FIcTnAjXIIQtyXu1mpHUcFrTcKlWMT74aK N88nkJQC407QmqB7i+KZys4jKyvfivtSv3p9bkIXgKndIPTuefnHXem8lAP0ocH3NclE pL5/CefWtPCp9PJCs2qUdFhSIF7mKG/c6K6PGEfS/hfCdCv3fzZR8gnR1hQ3IKx6BMUz ltBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0dIcGQcY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n12si10398796edo.512.2021.02.01.00.02.50; Mon, 01 Feb 2021 00:03:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0dIcGQcY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232284AbhBAIB5 (ORCPT + 99 others); Mon, 1 Feb 2021 03:01:57 -0500 Received: from mail.kernel.org ([198.145.29.99]:41662 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231598AbhBAIBx (ORCPT ); Mon, 1 Feb 2021 03:01:53 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 967D064D73; Mon, 1 Feb 2021 08:01:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1612166471; bh=dwZGpeS1TcK5yFFhy+waTC8VkChqi0kUMHO06WjX2kE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=0dIcGQcYEF2T4qVgJpyt0Lni9yV1hdE2LBY2mV6NPuFFNewm9dvGtxz+Wprqs09bh 9SLCyDY3NeRWsWusG5bBq6yW3UMXtdhuauTExJxtkuHD4NhEjZYZ6zj81d8LxXCjhv YHb/nJ0f1B1c+G5qiXAx4xQNYLIZpxjkFaOyoBP8= Date: Mon, 1 Feb 2021 09:01:07 +0100 From: "gregkh@linuxfoundation.org" To: Avri Altman Cc: "daejun7.park@samsung.com" , "James E . J . Bottomley" , "Martin K . Petersen" , "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Bart Van Assche , yongmyung lee , ALIM AKHTAR , "asutoshd@codeaurora.org" , Zang Leigang , Avi Shchislowski , Bean Huo , "cang@codeaurora.org" , "stanley.chu@mediatek.com" Subject: Re: [PATCH 3/8] scsi: ufshpb: Add region's reads counter Message-ID: References: <20210127151217.24760-4-avri.altman@wdc.com> <20210127151217.24760-1-avri.altman@wdc.com> <1891546521.01612153501819.JavaMail.epsvc@epcpadp3> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 01, 2021 at 07:51:19AM +0000, Avri Altman wrote: > > > > On Mon, Feb 01, 2021 at 07:12:53AM +0000, Avri Altman wrote: > > > > > +#define WORK_PENDING 0 > > > > > +#define ACTIVATION_THRSHLD 4 /* 4 IOs */ > > > > Rather than fixing it with macro, how about using sysfs and make it > > > > configurable? > > > Yes. > > > I will add a patch making all the logic configurable. > > > As all those are hpb-related parameters, I think module parameters are > > more adequate. > > > > No, this is not the 1990's, please never add new module parameters to > > drivers. If not for the basic problem of they do not work on a > > per-device basis, but on a per-driver basis, which is what you almost > > never want. > OK. > > > > > But why would you want to change this value, why can't the driver "just > > work" and not need manual intervention? > It is. > But those are a knobs each vendor may want to tweak, > So it'll be optimized with its internal device's implementation. > > Tweaking the parameters, as well as the entire logic, is really an endless task. > Some logic works better for some scenarios, while falling behind on others. Shouldn't the hardware know how to handle this dynamically? If not, how is a user going to know? > How about leaving it for now, to be elaborated it in the future? I do not care, just do not make it a module parameter for the reason that does not work on a per-device basis. > Maybe even can be a part of a scheme, to make the logic proprietary? What do you mean by "proprietary"? thanks, greg k-h