From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DFA5CC55ABD for ; Thu, 12 Nov 2020 09:54:34 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 500CE22210 for ; Thu, 12 Nov 2020 09:54:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="VAPLfT7m"; dkim=temperror (0-bit key) header.d=cerno.tech header.i=@cerno.tech header.b="EGuzmtS/"; dkim=temperror (0-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="j0ytNFQr" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 500CE22210 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=cerno.tech Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type:Cc: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: In-Reply-To:MIME-Version:References:Message-ID:Subject:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=J1CyaPni0ElSKbKX5/CuJIxzYAhzZdqJ/gb0eKYDamM=; b=VAPLfT7mwXb7WNXL7N9SM5ePW rYRPDLrWnTVenIQQe55ZbeEVqg36dG77mavrhTWSn9HO7JYGvgdMAjewFRox7/Rl3T52oFMOQLw2Q XjSATas/QG2p5I5N2WMYDsvHYHW5V7s5zSx5rTtf4ny33bVYONyCGU8n2ltn5lHrQTsC2uRzgtoMK lXd3S3mpKfmNT4OklmRLtLkTtOi2yD6JuAkontYbNpWpxN3E95oN2iHHktsBmgvwqYu/UGnFX6xWD uccS9y0G0C6N2gkREYKMAVT4RxB+7WoS/m/7nK4u3yx82QxTrmnXxYds0TYtkF2Dn+e6D401sm3TL Am9mxvhBQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kd9I6-0007Mn-Vg; Thu, 12 Nov 2020 09:53:19 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kd9I4-0007LR-Of for linux-arm-kernel@lists.infradead.org; Thu, 12 Nov 2020 09:53:17 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 726D35C026F; Thu, 12 Nov 2020 04:53:11 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Thu, 12 Nov 2020 04:53:11 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=+sWDnx/n+ybRIJoG2pafbzOn3UJ L3h7w5ofbZDMcvFU=; b=EGuzmtS/vMRW/yuTFYxtgA+Btxse1hyhbiH4MoZfbFR 9T0yeLAw1CI1OdSQr4ivGSnZEqLaE0hYvLhdOboXXPB6e0Ju/SVKs8BAV1lJjzti j0atF22z2JKw3PeOwC6wA8pHDYEyAH5EqE1O/vCrXP5K9Ow51dHpurrHN7ZZrjc6 2u9mx0PrJqA2m0pipM0Fn98sadkUHhshRUQH1CcfP/kboAvsbqEYomQUOESPmw6D YLEU0/fkOUXLTueiAW0f+Nw6eufrjvii/trniDJZyw6WaTLFVdLE0Wr9aQ9Mwerd d3Pi+KV7s9lRK1yyUvVmbdd7NBC9G1a74fBExBW3XNA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=+sWDnx /n+ybRIJoG2pafbzOn3UJL3h7w5ofbZDMcvFU=; b=j0ytNFQr8Utr00lzY+v2qL ufbAhvVrjELRPekWGsYrzwfiiQ32VrSfaFfgnNws+YLJ2xGZCPsHAMXmuChEi6aL 8PhN0Bf5Kq5UE5PKL/eePnJiug0x0iMr4u6s7HZM9ahKGqr6WLg6CJfdtsydlxaL tmmdZ1n6RutwFXO25KHCHir9bKbYC5jVU2nKq55AMRXi7s6BBjypNfsBsNabPvHl GdvllCW1aWt4eeOB4aYESkMGRtsPtdr1w373DTCihgxWzd4YBzij65svqgGEkQDv 9xWHTQUxCsy0hW1/1AanL5WOPfhE4e9ICgkMdcBHlCN2LDzJKL9TgVP6Hmfr7+FQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedruddvvddgtdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpeforgigihhm vgcutfhiphgrrhguuceomhgrgihimhgvsegtvghrnhhordhtvggthheqnecuggftrfgrth htvghrnhepffeijeetheethfevgeekvdejteeghfeiueekhefgteffudekteeikefftdej iefhnecuffhomhgrihhnpegsohhothhlihhnrdgtohhmnecukfhppeeltddrkeelrdeike drjeeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhep mhgrgihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Received: from localhost (lfbn-tou-1-1502-76.w90-89.abo.wanadoo.fr [90.89.68.76]) by mail.messagingengine.com (Postfix) with ESMTPA id 135813280059; Thu, 12 Nov 2020 04:53:09 -0500 (EST) Date: Thu, 12 Nov 2020 10:53:07 +0100 From: Maxime Ripard To: Samuel Holland Subject: Re: [PATCH 3/3] phy: sun4i-usb: Use power efficient workqueue for debounce and poll Message-ID: <20201112095307.pblcmrn6smyecvqi@gilmour.lan> References: <20201109121214.19012-1-frank@allwinnertech.com> MIME-Version: 1.0 In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201112_045316_888633_412F6F5D X-CRM114-Status: GOOD ( 24.21 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: tiny.windzz@gmail.com, wens@csie.org, krzk@kernel.org, linux-kernel@vger.kernel.org, vkoul@kernel.org, Frank Lee , colin.king@canonical.com, linux-arm-kernel@lists.infradead.org Content-Type: multipart/mixed; boundary="===============8651558080460895357==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============8651558080460895357== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="thkg54eq3saapyx3" Content-Disposition: inline --thkg54eq3saapyx3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Nov 10, 2020 at 09:44:37PM -0600, Samuel Holland wrote: > On 11/9/20 6:12 AM, Frank Lee wrote: > > From: Yangtao Li > >=20 > > The debounce and poll time is generally quite long and the work not > > performance critical so allow the scheduler to run the work anywhere > > rather than in the normal per-CPU workqueue. > >=20 > > Signed-off-by: Yangtao Li > > --- > > drivers/phy/allwinner/phy-sun4i-usb.c | 14 +++++++------- > > 1 file changed, 7 insertions(+), 7 deletions(-) > >=20 > > diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwin= ner/phy-sun4i-usb.c > > index 651d5e2a25ce..4787ad13b255 100644 > > --- a/drivers/phy/allwinner/phy-sun4i-usb.c > > +++ b/drivers/phy/allwinner/phy-sun4i-usb.c > > @@ -326,7 +326,7 @@ static int sun4i_usb_phy_init(struct phy *_phy) > > /* Force ISCR and cable state updates */ > > data->id_det =3D -1; > > data->vbus_det =3D -1; > > - queue_delayed_work(system_wq, &data->detect, 0); > > + queue_delayed_work(system_power_efficient_wq, &data->detect, 0); > > } > > =20 > > return 0; > > @@ -444,7 +444,7 @@ static int sun4i_usb_phy_power_on(struct phy *_phy) > > =20 > > /* We must report Vbus high within OTG_TIME_A_WAIT_VRISE msec. */ >=20 > This doesn't sound like "not performance critical" to me. My understandin= g is > the debouncing has a deadline from the USB spec. Maybe this is more flexi= ble > than the comment makes it sound? It's not really clear to me what the power_efficient workqueue brings to the table exactly from the comments on WQ_POWER_EFFICIENT (and the associated gmane link is long dead). It's only effect seems to be that it sets WQ_UNBOUND when the proper command line option is set, and WQ_UNBOUND allows for the scheduled work to run on any CPU instead of the local one. Given that we don't have any constraint on the CPU here, and the CPU locality shouldn't really make any difference, I'm not sure we should expect any meaningful difference. This is also what the rest of the similar drivers seem to be using: https://elixir.bootlin.com/linux/v5.10-rc3/source/drivers/usb/common/usb-co= nn-gpio.c#L119 https://elixir.bootlin.com/linux/v5.10-rc3/source/drivers/usb/core/hub.c#L1= 254 Maxime --thkg54eq3saapyx3 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCX60GAwAKCRDj7w1vZxhR xWGHAQDmGJRbV80bZACkQg9QHK386dBawts71lgws8vTZO8fLQEAn43EQDv/hXjz vgTtYcSCzPrZ4Zw1e5LbH9KJK71aegE= =Wgu7 -----END PGP SIGNATURE----- --thkg54eq3saapyx3-- --===============8651558080460895357== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel --===============8651558080460895357==--