Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1533832ybc; Tue, 19 Nov 2019 23:26:29 -0800 (PST) X-Google-Smtp-Source: APXvYqy6MD1sjHSNMyDuHqWB56+O3QwcFzOUyyvW++z+QD2poPPvDVydX9pzXOUEenhIXgo1vI93 X-Received: by 2002:a17:906:3ec8:: with SMTP id d8mr3339170ejj.55.1574234789686; Tue, 19 Nov 2019 23:26:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574234789; cv=none; d=google.com; s=arc-20160816; b=b1rAOHrTEJi+TVWiThfqT+DxGwYjSMvvFzVBXvNLpSvc20gN7LHNdWU7MfMHQAW0EJ ZpNq5dMl4m1eshLF4i1UbxidzCuRUmza0AQzo88ZECDZXFbZHlNgIy3yv32SvMiuwdFZ Z+QYIY2eNJLTvcbdpjnWbBX5qmjN0zMisD+rDuwlbuyqs0ZRYr6q+WNMpzjd/lAuZJnK VgyVOAaC6CYwgPUMcSfbG0O2xy0isyBXNRPf8wnLphOJ8Oo2Ddj2RNSB2CeyjMIRIS9I t/jneWgWYC63PXSrqCDrW4kztw2f1ygNNwMetoZkA23vxqddzMMonGv0X513iLVfgOFS hnmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=exLwy8I4wv0OS303Fp+Xi/Ap9Cd+ko2/xIdZfSeo7/c=; b=CiRybL5XJNL7262cp+QJ+8OOjSVAzRLenrYGfLal5Yi0Q4JebntEdxjIzVm0+prv+b ZRPjgFVeltZF8Yuibkh3kN1qRfFlXfkq/IsigVsGzdcQYvd5C8eFuWP90YJPzVzfGD9c sMfYFj0quwCQMK847cTnK/8anXkkpYhb+rH+jPK234HdrANR8WQ6YQLlQCZ6ua9AS9uA gM0Xz24yCX8I+Y+/jDTw3360efluyiRU/by0G60YSK/XI1rDRJBtx5EMEm7YC7wxKjrP 0lju6pfv6FXJ6wJ0hW0wggKq4A8c/9DUajjyI4Gv0f3wwYBj4+0XWXy0uT6WAmhTOMul VTPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=J3znqmQK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f37si17707059ede.11.2019.11.19.23.26.04; Tue, 19 Nov 2019 23:26:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=J3znqmQK; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727756AbfKTHWy (ORCPT + 99 others); Wed, 20 Nov 2019 02:22:54 -0500 Received: from mail-vk1-f196.google.com ([209.85.221.196]:45932 "EHLO mail-vk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725854AbfKTHWy (ORCPT ); Wed, 20 Nov 2019 02:22:54 -0500 Received: by mail-vk1-f196.google.com with SMTP id s4so3630748vkk.12 for ; Tue, 19 Nov 2019 23:22:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=exLwy8I4wv0OS303Fp+Xi/Ap9Cd+ko2/xIdZfSeo7/c=; b=J3znqmQK3Q0Ao+w13eeRO/EfbxBzc7qrTpXdEzyqQLwlKx6HNzsGA1qqAOQ9FUMjYt J7Nr5sDFCX6reUKxvIfJ2zb14bCRL3dAwXmTa7lu/U7OdjJ5+lbMJWzL59fyM8WMQyjL bwkea5cLAK3F3rMUyLqE5bx9ummbaAnxY/NW4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=exLwy8I4wv0OS303Fp+Xi/Ap9Cd+ko2/xIdZfSeo7/c=; b=NMe0WUgoT+VlEk+n4oJgGyZnNESN/khy+Z8wbgz22mbMeH6zvWOj7QoKUb//mSLWHX dVQhfyX2HTDcJ9iyacM/bmK0fqbJ+Sw+vkPsKPdSCLC7Av0G7yRDDxRB5qLjKbfELEVH m28FsRKGpNmehEb2Yg3FdJ+jRaO4EWDHP6cNFbraHNFDhaGDz7FzwLFaCFAIRmH7CNy8 ZqE+FHkG1WWb2M0YCjdZtBnZ4A9FNw4nHJNueoFUEZRc0zJwMa8WdFnzuuYM5iDEAQjn QdjGeWFXL1cTVJmmWN2BocNt5xNACYgdw7Ucy4J+g8keeBjjt8u6CHDSfrbcu+cKA3pO NbJg== X-Gm-Message-State: APjAAAVne6wVQd7SB1YUGGZLZ6XEnc/CP18j7Ses8nnRRUL3E1ZUZFhy 9d9GmAzv1+cObro8pFQqsLEdTkUFOIm1ULm76JxLTQ== X-Received: by 2002:a1f:250b:: with SMTP id l11mr611772vkl.10.1574234573246; Tue, 19 Nov 2019 23:22:53 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Ikjoon Jang Date: Wed, 20 Nov 2019 15:22:42 +0800 Message-ID: Subject: Re: [PATCH 0/2] usb: override hub device bInterval with device node To: Alan Stern Cc: linux-usb@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , Rob Herring , Mark Rutland , Suwan Kim , "Gustavo A . R . Silva" , Johan Hovold , Nicolas Boitchat Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 19, 2019 at 11:14 PM Alan Stern wrote: > > On Tue, 19 Nov 2019, Ikjoon Jang wrote: > > > On Sun, Nov 17, 2019 at 11:46 PM Alan Stern wrote: > > > > > > On Sun, 17 Nov 2019, Ikjoon Jang wrote: > > > > > > > This patchset enables hard wired hub device to use different bInterval > > > > from its descriptor when the hub has a combined device node. > > > > > > > > When we know the specific hard wired hub supports changing its polling > > > > interval, we can adjust hub's interval to reduce the time of waking up > > > > from autosuspend or connect detection of HIDs. > > > > > > In fact, _all_ hubs support changing the polling interval. The value > > > given in the USB spec is just an upper limit; any smaller value is > > > equally acceptable. > > > > > > So why are you doing this only for hard-wired hubs? Why not for all > > > hubs? > > > > Because we only want to apply it to a specific device instance under > > our control. > > Why? What's so special about that device instance? > > For example, why not instead have a poll_interval sysfs attribute for > all hubs that can be written from userspace? Then people could reduce > the autoresume latency for any device they want. Changing its INT interval during runtime seems not so easy, there's no device drivers doing this to my knowledge. At least xhci needs to restart endpoint to change the interval. So I think patching ep descriptor at enumeration stage is more convincing. > > > We apply autosuspend to built-in touchpad device for power savings, > > > > Users can attach external hub devices with same VID:PID that we don't want to > > change the behavior. > > Why don't you want to change the behavior? Or allow the user to change > the behavior? > Yes, that's a difficult question here too, when the hub is external device, it can't be fully controlled by here. Even though it's the same VID:PID hub chip, that's not the 100% same device. We don't know how much this will impact to the other external hub devices regarding power consumption and compatibility. > > Maybe disabling autosuspend for external HIDs > > can be more reasonable for that case? > > If it makes sense to to save power for your built-in touchpad device, > why doesn't it also make sense to save power for other external HIDs? > > > > And is 250 ms really too long to wait for remote wakeup or connect > > > detection? What's the real motivation behind this change? > > > > When a user starts to move the cursor while touchpad is in autosuspend state, > > It takes more than >250ms (worst case can be >500ms) to wake up and response. > > That makes the cursor stuck for a while and warp to another location suddenly. > > All right, that's a good reason. But doesn't it apply just as well to > other devices, not only your built-in touchpad? Actually the hub is the one to be applied, I don't care much about the rare case that a user connects an additional external hub with same PID and connect external HID under that hub. We could reduce autosuspend delay for built-in touchpad when we know that's better for power savings only if response time of wake up is good enough. but we don't know the optimal values for external HIDs. So we could use the default long delay for external devices, or just disable autosuspend for all external HIDs, so user might experience much less cursor lags even with that rare case. > > Alan Stern >