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=-3.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 21BBFC43467 for ; Wed, 14 Oct 2020 16:46:12 +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 7EE28214D8 for ; Wed, 14 Oct 2020 16:46:11 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Oeqs2lEM"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="NIoUc/R+"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="gcXKnbuq" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7EE28214D8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linutronix.de 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-Transfer-Encoding: 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-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=E1Pda74m9uP1uawSB3f+OXdM0Bh6hPcx2Gi8dH0pSd0=; b=Oeqs2lEM02tPjPBkfi7q7Z9Y/ Qjd5bTgOdzJ851eieO5Is/bsMW0Kr+htiuOuhCOziHPEMoWcc3XqsHaa+I2RrsnU0s1XXS+Osk5mn MpgMQFAiya99cLaq1zBnyFGqO3h4zScmvQeHssf5F22Vbm3jPCTEepCOwkQDJVhlA7P+K1fSgMng9 Oq2GpM6Ou/UixsMgdE0Xcg0Fgu+d31be56jwQr2vFuX050+PmGdTXtA6dAY9hYjO366oec/9StAx2 VNaKIdR/JKIyHpzq1Fre2bHG21FnhRv2NXcXqE4XfCZUfwVWW/jMQNPNCsIRR4JaPDt875tRH+pQP m2Y6snYJA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kSjtT-000281-3n; Wed, 14 Oct 2020 16:44:51 +0000 Received: from galois.linutronix.de ([193.142.43.55]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kSjtP-00027B-Lw for linux-arm-kernel@lists.infradead.org; Wed, 14 Oct 2020 16:44:48 +0000 Date: Wed, 14 Oct 2020 18:44:43 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1602693885; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=zAjTF2tvsD0V9R0iboON9J/WHaKQyttRthc3o5MCNUM=; b=NIoUc/R+XCVqOSwu2oDnlmcFuWxwi0qBJR10Ewtfv8G4TtgfP8C39TvFwo51kSOInNdMzP KwSQDMQLFLu4dI8IWdVbGSnhMxqtirL/r7Erh/kj3V3V+ThAPHQBb9ZxlFjLifxlxW+XTv U98DppwGDyHnqtqPnW/d7lxfWuuBqmVLH9pHKUXUd/31AjbdyB3uobhw2EBJGbpTUvw/oO P9Gsq6MixUwHewHE82UCkO16XGixQTABWWxS4Cz8BKGEopVsywJ8Z2dvhptFac8h7p/7bf ZFDNScC8xX4I3O9L1ipViKHMheIsbKTqajZWzO4V+W6daFjTIvFqPaVAFEwsdw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1602693885; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=zAjTF2tvsD0V9R0iboON9J/WHaKQyttRthc3o5MCNUM=; b=gcXKnbuqKZQ4iJNiXtOhVGCmWuPiMl04f5Bgy+IfD5qIYdOK5klQFW+0bC6IE+MdVjmTOf u6e56ZwwSwgVkfBw== From: Sebastian Andrzej Siewior To: Alan Stern Subject: Re: [patch 03/12] USB: serial: keyspan_pda: Consolidate room query Message-ID: <20201014164443.husmibyqb4ukw5xg@linutronix.de> References: <20201014145215.518912759@linutronix.de> <20201014145727.338773481@linutronix.de> <20201014161433.GB712494@rowland.harvard.edu> <20201014162714.ctv5earlhwsp4iqs@linutronix.de> <20201014163425.GF712494@rowland.harvard.edu> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201014163425.GF712494@rowland.harvard.edu> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201014_124447_901640_9D53E591 X-CRM114-Status: GOOD ( 19.60 ) 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: Felipe Balbi , Thomas Winischhofer , Mathias Nyman , Peter Zijlstra , Greg Kroah-Hartman , linux-usb@vger.kernel.org, LKML , Krzysztof Kozlowski , Johan Hovold , linux-samsung-soc@vger.kernel.org, Kukjin Kim , Valentina Manea , Duncan Sands , "Ahmed S. Darwish" , Thomas Gleixner , linux-omap@vger.kernel.org, Shuah Khan , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 2020-10-14 12:34:25 [-0400], Alan Stern wrote: > On Wed, Oct 14, 2020 at 06:27:14PM +0200, Sebastian Andrzej Siewior wrote: > > On 2020-10-14 12:14:33 [-0400], Alan Stern wrote: > > > Instead, consider using the new usb_control_msg_recv() API. But it > > > might be better to allocate the buffer once and for all. > > > > This will still allocate and free buffer on each invocation. What about > > Yes. That's why I suggesting doing a single buffer allocation at the > start and using it for each I/O transfer. (But I'm not familiar with > this code, and I don't know if there might be multiple transfers going > on concurrently.) There are no concurrent transfer. There is a bit used as a lock. The first one does the transfer, the other wait. > > moving the query_buf to the begin of the struct / align it? > > No, thank won't work either. The key to the issue is that while some > memory is mapped for DMA, the CPU must not touch it or anything else in > the same cache line. If a field is a member of a data structure, the > CPU might very well access a neighboring member while this one is > mapped, thereby messing up the cache line. that is unfortunately true. Let me do the single buffer. > Alan Stern Sebastian _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel