From patchwork Tue Aug 21 17:06:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Matwey V. Kornilov" X-Patchwork-Id: 10572209 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5CE7B14E1 for ; Tue, 21 Aug 2018 17:36:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 403852A9A0 for ; Tue, 21 Aug 2018 17:36:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 345242ABF6; Tue, 21 Aug 2018 17:36:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 588D62A9A0 for ; Tue, 21 Aug 2018 17:36:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726818AbeHUU5D (ORCPT ); Tue, 21 Aug 2018 16:57:03 -0400 Received: from lnfm1.sai.msu.ru ([93.180.26.255]:52886 "EHLO lnfm1.sai.msu.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726694AbeHUU5C (ORCPT ); Tue, 21 Aug 2018 16:57:02 -0400 X-Greylist: delayed 1722 seconds by postgrey-1.27 at vger.kernel.org; Tue, 21 Aug 2018 16:57:01 EDT Received: from dragon.sai.msu.ru (dragon.sai.msu.ru [93.180.26.172]) by lnfm1.sai.msu.ru (8.14.1/8.12.8) with ESMTP id w7LH6XOF026336; Tue, 21 Aug 2018 20:06:38 +0300 Received: from alpha.local (unknown [92.243.181.209]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by dragon.sai.msu.ru (Postfix) with ESMTPSA id 5121069ED; Tue, 21 Aug 2018 20:06:34 +0300 (MSK) From: "Matwey V. Kornilov" To: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: matwey.kornilov@gmail.com, "Matwey V. Kornilov" , tfiga@chromium.org, laurent.pinchart@ideasonboard.com, stern@rowland.harvard.edu, ezequiel@collabora.com, hdegoede@redhat.com, hverkuil@xs4all.nl, mchehab@kernel.org, rostedt@goodmis.org, mingo@redhat.com, isely@pobox.com, bhumirks@gmail.com, colin.king@canonical.com, kieran.bingham@ideasonboard.com, keiichiw@chromium.org Subject: [PATCH v5 0/2] media: usb: pwc: Don't use coherent DMA buffers for ISO transfer Date: Tue, 21 Aug 2018 20:06:27 +0300 Message-Id: <20180821170629.18408-1-matwey@sai.msu.ru> X-Mailer: git-send-email 2.16.4 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP DMA cocherency slows the transfer down on systems without hardware coherent DMA. In order to demontrate this we introduce performance measurement facilities in patch 1 and fix the performance issue in patch 2 in order to obtain 4 times speedup. Changes since v4: * fix fields order in trace events * minor style fixes Changes since v3: * fix scripts/checkpatch.pl errors * use __string to store name in trace events Changes since v2: * use dma_sync_single_for_cpu() to achive better performance * remeasured performance Changes since v1: * trace_pwc_handler_exit() call moved to proper place * detailed description added for commit 1 * additional output added to trace to track separate frames Matwey V. Kornilov (2): media: usb: pwc: Introduce TRACE_EVENTs for pwc_isoc_handler() media: usb: pwc: Don't use coherent DMA buffers for ISO transfer drivers/media/usb/pwc/pwc-if.c | 64 ++++++++++++++++++++++++++++++++--------- include/trace/events/pwc.h | 65 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 116 insertions(+), 13 deletions(-) create mode 100644 include/trace/events/pwc.h