Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3157900imu; Fri, 23 Nov 2018 22:57:45 -0800 (PST) X-Google-Smtp-Source: AFSGD/X+1mMxzIeEWSQZF1KNgBFQAWk2b1vcAGe4OAMM1gE1NwYaY7iwh3K0e/Z4o+lyxRW7v+wP X-Received: by 2002:a63:d604:: with SMTP id q4mr16778068pgg.175.1543042665626; Fri, 23 Nov 2018 22:57:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543042665; cv=none; d=google.com; s=arc-20160816; b=ZktmYiuDyClsJz+q+M4JZFp5YWLWTvrSme8LI+q9TrQ2+dSzdPjWaAQcYGN1DQIE7F hRLtgeHoNEZSAT+SOSXM58VJzuIbDM5uV5ItNqMWYtBvc5qZXTGI260NzbbosPwGrTYT gSmXrih22M+TEoN8qASpUZ7opIVDkYVMYozma0QbRuPRfTlPpeEzJRpuEYxKGW6a4Q3a TVouyRQqRu5tQsnTtzhITxolq951EU2NyVLbgsVJZ4FbJPfpNKlBX4B4Ty5+jrMq16Te YSejCEuZToQBhE/AQvc3wYFDgH3VTC8niEg4rC0ftoUS6l2XX7HiddnWGx6FXWDxVYMq FcqQ== 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=cn/wxTBq2taxHU9QQJnCgVvU+LT4pCPMmAtsJ7XjpiM=; b=aa2ucyyhQ0Lm/vB4r9g7a6DlACoIktdj/04kDYZ4pqeDhtAljtsyM3JNkOHL2jHvu0 9kuoAWvZ29vUNogjIQTBaZRBog4l4HeRM/flQJQDVrA8/iNEd544+aXufM5LB1zwOFNw FHUV1oPxYFl9sKt4cYuOd2qI+lXUdGb9uLNMxNvu/mZB4Oxn1bVljV+bLkbcn1ex2X98 tt9ZELuG578/wzaV8t/pB2pmavSgaAv8E/QKU5cx+4TZ5BeVBMBGZDSQVyKG2dJDpXgP qM5sY8HNXEq09Mg8/o3gUscO6yIveRvn8o8w+aV30NvOngi2UXrQkXuo0dmOet1xMTFi wxhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=c5IQ7ntQ; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g10si24014020plq.371.2018.11.23.22.57.31; Fri, 23 Nov 2018 22:57:45 -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=@linux-foundation.org header.s=google header.b=c5IQ7ntQ; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392211AbeKWDqY (ORCPT + 99 others); Thu, 22 Nov 2018 22:46:24 -0500 Received: from mail-lj1-f193.google.com ([209.85.208.193]:33407 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732667AbeKWDqX (ORCPT ); Thu, 22 Nov 2018 22:46:23 -0500 Received: by mail-lj1-f193.google.com with SMTP id v1-v6so8559559ljd.0 for ; Thu, 22 Nov 2018 09:06:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=cn/wxTBq2taxHU9QQJnCgVvU+LT4pCPMmAtsJ7XjpiM=; b=c5IQ7ntQMIDJaQuujnwPkUaDxbJPZTTSojL3yTA0LhehxLjh/EnqhcEC0P6jFuPQAU UhGBgBFEguHfxnLBPMKN0hmSyp9UmlwZwgzkBGFCTKDM5jgVKzXXNK9ZLtoN8DBxjaHH 29sYrNuKk7AFLAoKK76XPrUGtvPPBYldB5I1Q= 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=cn/wxTBq2taxHU9QQJnCgVvU+LT4pCPMmAtsJ7XjpiM=; b=WC5l2Typ8CDHIM44mBHhxYI/mUFpUTy6E99sVZ009vccWcmp8HbK8L+zBvvh9y9M5W MyV0ixMbAx8oXgVBZpDLgPcVDRbUEqx9C43zVxj/nFMojPddUyWMkMHo1ZrdXpqWQDaR xeT5wNJHrEE9EgckCjikb1z6GkYEN+DTqgtRG4aNiDV1eOk3Nm18bSWoSQSCV5C2HNMa VnD9xj9ChFR1vFWzREf8vfRSJAUs5rKb2EAtmgnLMxYB++3LPVbNfaxLhmacyQTI0NLQ pHTlXk3A2ZTsJMySqxT6QNTwOoJM95vd1iW7pRp3V3GknyaEJahIX0LwE6Q5d0mRyPxL qeGw== X-Gm-Message-State: AA+aEWYY8I+SLDNIYWshkbY0qCe6Y+4zsPsLWftA57SA+2bvh6uH2WlK WqvzBgGoYvQByNDG3SwcZH3Cn3Ue5rPNOw== X-Received: by 2002:a2e:5109:: with SMTP id f9-v6mr8112692ljb.52.1542906365791; Thu, 22 Nov 2018 09:06:05 -0800 (PST) Received: from mail-lf1-f48.google.com (mail-lf1-f48.google.com. [209.85.167.48]) by smtp.gmail.com with ESMTPSA id p77-v6sm8465300lja.0.2018.11.22.09.06.04 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Nov 2018 09:06:04 -0800 (PST) Received: by mail-lf1-f48.google.com with SMTP id e26so6995607lfc.2 for ; Thu, 22 Nov 2018 09:06:04 -0800 (PST) X-Received: by 2002:a19:3fcf:: with SMTP id m198mr6782122lfa.106.1542906363913; Thu, 22 Nov 2018 09:06:03 -0800 (PST) MIME-Version: 1.0 References: <20181122063409.15816-1-peter.hutterer@who-t.net> <20181122063409.15816-9-peter.hutterer@who-t.net> In-Reply-To: <20181122063409.15816-9-peter.hutterer@who-t.net> From: Linus Torvalds Date: Thu, 22 Nov 2018 09:05:47 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 8/8] HID: logitech: Enable high-resolution scrolling on Logitech mice To: Peter Hutterer Cc: linux-input@vger.kernel.org, Dmitry Torokhov , Jiri Kosina , Harry Cutts , nlopezcasad@logitech.com, Linux List Kernel Mailing , Benjamin Tissoires 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 Wed, Nov 21, 2018 at 10:35 PM Peter Hutterer wrote: > > This patch is a combinations of the now-reverted commits 1ff2e1a44e0, > d56ca9855bf9, 5fe2ccbef9d, 044ee89028 together with some extra bits for the > directional and timeout-based reset. Instead of using an actual timer (which is quite expensive), how about just saving the "last time" data along with the remainder? We have a fairly low-overhead 'sched_clock()' function that gives a clock approximation in nanoseconds (64 bits). Note that it doesn't actually give nanosecond precision - it might fall back to jiffies for hardware that doesn't have anything better, but for timeouts on the order of a second, it's fine. Linus