From patchwork Thu Aug 9 18:11:01 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: 10561669 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 931E413BB for ; Thu, 9 Aug 2018 18:12:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7D80B2B7E6 for ; Thu, 9 Aug 2018 18:12:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 70DFE2B7FB; Thu, 9 Aug 2018 18:12:10 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 D6BD82B7E6 for ; Thu, 9 Aug 2018 18:12:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727514AbeHIUhi (ORCPT ); Thu, 9 Aug 2018 16:37:38 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:45943 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727475AbeHIUhh (ORCPT ); Thu, 9 Aug 2018 16:37:37 -0400 Received: by mail-lf1-f68.google.com with SMTP id j143-v6so4738503lfj.12; Thu, 09 Aug 2018 11:11:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id; bh=DHqpP56i45ZioyVBt/LDOO1BKVOPtqsaYC3D/EWK/AY=; b=hcLS46j3iobw8s5vlnvlLMCW6vU3uMzpakS+1I/3ZUHUcnRwilIWT8Z3RZZodLYbVg J35ZXeM8ACMJ6okp3zzNtbEGMX1fX+Bl7uLPdx7OSKwL/wfpgTQ3yG9nF56EJ5CtluOb jyPIJNeT67Y4OscMAXCmuLQjpOMwF4GF6T2w9qg9JKPzUyJXroK/sUzcVTfEnU+943VF 490o68jPzruNQM8Nmh+YK1j7IsvX9Wj+IpYfa39YNc5qQWm8M9ttt9hSC5bOyAlq/7er ZJ0cFcTrYQS3oREZykYTHPcQfQ/nXib6Owwg4yhz0+5xVFj83FeQjQQWzGBi1Y/CD+Ec g+ZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=DHqpP56i45ZioyVBt/LDOO1BKVOPtqsaYC3D/EWK/AY=; b=dmHu2LpY9uHyK0nv+0QAd/4sEnxufKcDvODliMOZU6DM1q/j0WorrHYiY9k8nOimb0 khGlzwQeb3mUgZ7m8RJqBJLqg8jSk9gz54qRqUVL50xoHz8A20zVo4ySDF1+KXQAogaz rfn8rLjNnfvzOiHY1Eg3TUB376RG2VzpDp6AvuvfvNvKwPrwrO6vsMX6KGk0QZ+zx4mo DmgnQzTc7wU6IjsKhcL4VFSmAKOvRhvO3NeB+vTy0jteO3Vae2lo9f3Djr0iEZqUgOw9 rL/dTZyoW7cK7aNQ0xu9iQhqAJizLYRfMqg6oSH0e/mag/XWa87ymJwoxCKxYzRFknun e+1A== X-Gm-Message-State: AOUpUlFh8nKUroh2I5/DOINTwoJ7qQfJOCMov17DwzPsXVGua0Y3dQPs rtMYezj/PG1dpSyR063fUsA524xPYmo= X-Google-Smtp-Source: AA+uWPxzKCYv02638wZL8OIx/rdOxMSeXwTIytVlTZlPQinq194+44LEAX0ip1E5uSLhgQFnEcs2vw== X-Received: by 2002:a19:ebd7:: with SMTP id f84-v6mr2201582lfk.18.1533838295085; Thu, 09 Aug 2018 11:11:35 -0700 (PDT) Received: from localhost.localdomain ([213.87.133.10]) by smtp.gmail.com with ESMTPSA id n7-v6sm1432211lfe.87.2018.08.09.11.11.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Aug 2018 11:11:34 -0700 (PDT) From: "Matwey V. Kornilov" To: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: "Matwey V. Kornilov" , tfiga@chromium.org, laurent.pinchart@ideasonboard.com, matwey@sai.msu.ru, 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 v4 0/2] media: usb: pwc: Don't use coherent DMA buffers for ISO transfer Date: Thu, 9 Aug 2018 21:11:01 +0300 Message-Id: <20180809181103.15437-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 From: "Matwey V. Kornilov" 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 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 | 63 ++++++++++++++++++++++++++++++++-------- include/trace/events/pwc.h | 65 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 116 insertions(+), 12 deletions(-) create mode 100644 include/trace/events/pwc.h