Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp868179lqb; Wed, 29 May 2024 13:02:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXxlevK3n2YOgzbYEjU7G29jvbMwgSrY1j7Letxd+w1qhLFXujDGvial6oTt6HMTGUID0MjLC4al3i7ilj8u5wXup5IreqAACLr/f4KaA== X-Google-Smtp-Source: AGHT+IGacaoyWW7CrXeeReAyTfTYJamnQ7DI97njltZdWUuKJvEnNP5L6i2UCnpohJ6wN/wfYKXY X-Received: by 2002:a2e:b8d2:0:b0:2e3:7121:aba6 with SMTP id 38308e7fff4ca-2e95b27af19mr171447751fa.46.1717012967518; Wed, 29 May 2024 13:02:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717012967; cv=pass; d=google.com; s=arc-20160816; b=fhMJW6CnespxzyH3zlsyQCi9lM5bRzwx2L3AbRxiT99d/N0RU1p7upkLIaiUJ9nXLX a1HAFgjvrtFHmK1bVJqbk2aprbXS0mg3d6XeIUjFcWKlfkcras+8SsYYeJFNYzscrdY8 pXqhRWwCd1/oFeWgrn99jmDyOZQnRpMXZJrOn6po2DLloOwc/tBxAEDM2kwXYb6/tRA6 1xvqRjFJM3p5NZ9R53866U2I7LJL7JZvvCbLNk2Rcli5vnnh4ws8qTtdWB4YjrtkKPQU UCSRll8sGUKO/vadVuiuzeywCn9JqpA3JSfeKaHtJMcgBSVLdY0z1DBAEbTOgIdRNeAs 2oug== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=BsBWx6rt7XKTmBO9OqYrip5alx7g+yyYVBrkP5DYA/c=; fh=K+Tg+GhtIqZfvlhfGR7M/+sET2hfDDyZF+hArCUWMWo=; b=OQ6PgAXPD2AtAi+54b8XZcIHa1E1XM7PiZytrARFYQUhqLwhAm5FOq9FLZDS1uGvJp BWJlgpiH73bd1gxM6DaVlrhg0h0SQUamnHJeinLZ6/Q3O8UK/iFl1fJ0u9VKDDupjJse Tky7awc/pNEiSPsVq8M+H5hNR45O/izA0fPQgxEvtArRYWMNxZn2bFFxo45KIUiaLhe6 586TA2fS2mXkodrJjD4QfUqjb02rAASNcxaHH3qpzgtfcGEWJ6mQJ0nlZhEXhPpXPm2G R3DH1yjfFcVuqipFK0DxzfDal5fBxFUIFaKOlH+CzvaggOwRdrMQPKIgdQTnSoVhL/x2 hbvQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@acm.org header.s=mr01 header.b=lWKJhAAF; arc=pass (i=1 spf=pass spfdomain=acm.org dkim=pass dkdomain=acm.org dmarc=pass fromdomain=acm.org); spf=pass (google.com: domain of linux-kernel+bounces-194633-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194633-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=acm.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-578524d2d0fsi6731905a12.631.2024.05.29.13.02.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 May 2024 13:02:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-194633-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@acm.org header.s=mr01 header.b=lWKJhAAF; arc=pass (i=1 spf=pass spfdomain=acm.org dkim=pass dkdomain=acm.org dmarc=pass fromdomain=acm.org); spf=pass (google.com: domain of linux-kernel+bounces-194633-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-194633-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=acm.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 am.mirrors.kernel.org (Postfix) with ESMTPS id D1C5B1F24BFF for ; Wed, 29 May 2024 20:02:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4937018E06; Wed, 29 May 2024 20:02:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b="lWKJhAAF" Received: from 008.lax.mailroute.net (008.lax.mailroute.net [199.89.1.11]) (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 CFD14DDA1; Wed, 29 May 2024 20:02:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=199.89.1.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717012943; cv=none; b=Vz0E4M6/L3xKhPvjDZXZY/q9/L+qNd0qH14jpvkfUisiTRrm0VKFJTB90qJq7Tlmeb2BzAbPyVm35OtZ9eqJmF0jV/v3LAWqBx5FhGdSdxcanI4NZslUpkYJkGV8aTQ29tiJrubcBgfYRlqC45jvqLZJVqSGT2p5UDwLhQo4kv4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717012943; c=relaxed/simple; bh=uoeP/ZwWetQAmYm+NWLIZq1WWa6NvZlKRvH5A7Q7LnM=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=NMDuZe73dj+0r2O9Ci5qEv3GEiApnKsKDRX88grWCTtpw4bYqlEJnX8nYEmo8DRh62/c3UtVqPYjG9Wj8d9ZzgFOvp6VNHa+20NsfKDDri3Ur+VxwLfKhUeyoOEEgIkaS4coZHso7L+GMgSmiXnp48hofM9yQu5PZnXQJiPqEJM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org; spf=pass smtp.mailfrom=acm.org; dkim=pass (2048-bit key) header.d=acm.org header.i=@acm.org header.b=lWKJhAAF; arc=none smtp.client-ip=199.89.1.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=acm.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=acm.org Received: from localhost (localhost [127.0.0.1]) by 008.lax.mailroute.net (Postfix) with ESMTP id 4VqKzW3g9Bz6Cnk98; Wed, 29 May 2024 20:02:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=acm.org; h= content-transfer-encoding:content-type:content-type:in-reply-to :from:from:content-language:references:subject:subject :user-agent:mime-version:date:date:message-id:received:received; s=mr01; t=1717012933; x=1719604934; bh=BsBWx6rt7XKTmBO9OqYrip5a lx7g+yyYVBrkP5DYA/c=; b=lWKJhAAFnD4regaOzBo2CMF3nCGaj6EdqB7E9ApF 2gc01eXOjhGjZyl97mxzl2+ym7amJo87E7tN0XhzSX6n13fwuF1DCfOBvd+X0aMY t5f3GYJsTYnHBEI1m5N6DU2opnKZ4/Nw+cuxZe3+nzbr0POj3Ob8eEEDe/EtWLtB 314xdPe0iOKLbSk0sWQiWbZkccn8Db33m5CmKclAG8iyvE4LN9OSLjVHb6JaN9wF fI7FkQjOAxta3uwEvhcIon5awyek5ZLnijvO+hYatg6FB2IhnQyuOgNSf2YsD1SP oscToafrbu0ME58DjBJRjEIqfZlsFjYjil8mRb/W41LWyw== X-Virus-Scanned: by MailRoute Received: from 008.lax.mailroute.net ([127.0.0.1]) by localhost (008.lax [127.0.0.1]) (mroute_mailscanner, port 10029) with LMTP id 2k_xyZiv_lwt; Wed, 29 May 2024 20:02:13 +0000 (UTC) Received: from [100.96.154.26] (unknown [104.132.0.90]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: bvanassche@acm.org) by 008.lax.mailroute.net (Postfix) with ESMTPSA id 4VqKzR4Tl5z6Cnk97; Wed, 29 May 2024 20:02:11 +0000 (UTC) Message-ID: <4251566e-0a1a-48f1-b170-d5987bbabd90@acm.org> Date: Wed, 29 May 2024 13:02:09 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v6 3/3] scsi: ufs: sysfs: Make max_number_of_rtt read-write To: Avri Altman , "Martin K . Petersen" Cc: Bean Huo , Peter Wang , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org References: <20240526081636.2064-1-avri.altman@wdc.com> <20240526081636.2064-4-avri.altman@wdc.com> Content-Language: en-US From: Bart Van Assche In-Reply-To: <20240526081636.2064-4-avri.altman@wdc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 5/26/24 01:16, Avri Altman wrote: > +static inline void ufshcd_freez_hw_queues(struct ufs_hba *hba) > +{ > + struct scsi_device *sdev; > + > + shost_for_each_device(sdev, hba->host) { > + if (sdev == hba->ufs_device_wlun) > + continue; > + blk_mq_freeze_queue(sdev->request_queue); > + blk_mq_quiesce_queue(sdev->request_queue); > + } > +} > + > +static inline void ufshcd_unfreez_hw_queues(struct ufs_hba *hba) > +{ > + struct scsi_device *sdev; > + > + shost_for_each_device(sdev, hba->host) { > + if (sdev == hba->ufs_device_wlun) > + continue; > + blk_mq_unquiesce_queue(sdev->request_queue); > + blk_mq_unfreeze_queue(sdev->request_queue); > + } > +} Why have these functions been declared inline? blk_mq_freeze_queue() may sleep and hence performance is not an argument to inline these functions. Additionally, the WLUN should not be skipped when freezing or unfreezing request queues. The blk_mq_quiesce_queue() and blk_mq_unquiesce_queue() calls are not necessary in the above code. Please remove these. Thanks, Bart.