Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp843727rwb; Tue, 4 Oct 2022 11:24:17 -0700 (PDT) X-Google-Smtp-Source: AMsMyM72o+WDFt8nMld8TwcP1BiPib2K6WTO73ND3dl+lsoM+81rHbVZJeR1ztGdJPXuvfRb37TK X-Received: by 2002:a17:902:8c81:b0:178:1701:cd with SMTP id t1-20020a1709028c8100b00178170100cdmr28880822plo.138.1664907856805; Tue, 04 Oct 2022 11:24:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664907856; cv=none; d=google.com; s=arc-20160816; b=A2satab4yzc6J3k4/4upcLy1xv+735QN0hXnQbkEgYxFtqLqd0o07HGIfSy52awxEX 6/Zai1M+MWgtBLQPrhTmHQhl13BYoPz7ntatwidvFgFxT4t+FgTkY9wrxl6/g2bZU4Ui 2KlcZW1ZpGgElDSbpQEuhwmMSGkNG1mx0umfVAxcLhKcwaIpe2F1ZlX3XnBZeMX5rXCq nJfekxW2RLQXEKIyG5VG0033s9FrbB1qCA66n/tPxtxZav5dmq3LifgCN7HgUdcnvzZO 42/n+9oBALiBNLsuo0bAEhkoJOPs25fqrctDSNl7M20pV6y0TTPONNpq4CY3qokELWni DkOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id; bh=ki9wE0tS2hkev4XEHYoyGDcYVNsJrKZk5EpFO6SUV+k=; b=nb4w12+SDd9r8ApBqw6eFxS6cF4hCqW9+bzDMro1YATnXRYyJnDl8dAkwfOcz9uLd+ 5V8U2Y3F5cPqZ9DJ3p3/V3JC5Od3c1HTn8q/0ry5rU7yuNlyadg/oqlYbOx8Dfjs77L0 v53N2rnrX/LmMC54R0Sfx+hDpmssl3HhC56H0ldOzZaZK8o5koH2TzotMTKmYPnpjIYN ppO4GZirWVWiBVto+porpOUEHlVekGwIX9TryjLIgFMdiWXDXVsmpz/L2Trh5HJh4dhB hSYW1pq3qkNfDG+QDRZIQlJq1aCL2IfxhMxMtqhTHYiHZT5aY4I67VulQ9MrqZyUrrkK eq4Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f5-20020a63f745000000b0043c0753be2bsi13831902pgk.776.2022.10.04.11.24.04; Tue, 04 Oct 2022 11:24:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230036AbiJDSQD convert rfc822-to-8bit (ORCPT + 99 others); Tue, 4 Oct 2022 14:16:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230017AbiJDSQA (ORCPT ); Tue, 4 Oct 2022 14:16:00 -0400 Received: from mail.inka.de (mail.inka.de [IPv6:2a04:c9c7:0:1073:217:a4ff:fe3b:e77c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C79CC1EAFE; Tue, 4 Oct 2022 11:15:59 -0700 (PDT) Received: from mail3.berkhan-weisser.de ([2a03:4000:54:b9a::4]) by mail.inka.de with esmtpsa id 1ofmST-001Gj9-QH; Tue, 04 Oct 2022 20:15:57 +0200 Received: from 127.0.0.1 (helo=localhost.localdomain) by mail3.berkhan-weisser.de with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94.2) (envelope-from ) id 1ofmST-00AtOx-E9; Tue, 04 Oct 2022 20:15:57 +0200 Message-ID: <4ce2960686605f2290046b396a8edc4cc47beb9e.camel@inka.de> Subject: Re: [PATCH v2 5/7] HID: ft260: improve i2c large reads performance From: Enrik Berkhan To: Michael Zaidman , jikos@kernel.org Cc: linux-kernel@vger.kernel.org, linux-input@vger.kernel.org, Guillaume Champagne Date: Tue, 04 Oct 2022 20:15:56 +0200 In-Reply-To: <20220928144854.5580-6-michael.zaidman@gmail.com> References: <20220928144854.5580-1-michael.zaidman@gmail.com> <20220928144854.5580-6-michael.zaidman@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.44.1-0ubuntu1 MIME-Version: 1.0 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Michael, On Wed, 2022-09-28 at 17:48 +0300, Michael Zaidman wrote: > After: > > $ sudo ./i2cperf -d 2 -o 2 -s 128 -r 0-0xff 13 0x51 -S > > Read block via i2ctransfer by chunks > ------------------------------------------------------------------- > data rate(bps) efficiency(%) data size(B) total IOs IO size(B) > ------------------------------------------------------------------- > 49316 85 256 2 128 > > Kernel log: > > [ +1.447360] ft260_i2c_write_read: off 0x0 rlen 128 wlen 2 > [ +0.000002] ft260_i2c_write: rep 0xd0 addr 0x51 off 0 len 2 wlen 2 flag 0x2 d[0] 0x0 > [ +0.001633] ft260_xfer_status: bus_status 0x41, clock 100 > [ +0.000190] ft260_xfer_status: bus_status 0x40, clock 100 > [ +0.000001] ft260_i2c_read: rep 0xc2 addr 0x51 len 128 rlen 128 flag 0x7 > [ +0.008617] ft260_raw_event: i2c resp: rep 0xde len 60 > [ +0.008033] ft260_raw_event: i2c resp: rep 0xde len 60 > [ +0.000954] ft260_raw_event: i2c resp: rep 0xd1 len 8 As the ft260 can pack up to 60 bytes into one report, would it make sense to use a multiple-of-60 size (120 or 180)? Might reduce overhead by another tiny bit ... Cheers, Enrik