From patchwork Fri Jun 27 15:52:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 32625 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ig0-f199.google.com (mail-ig0-f199.google.com [209.85.213.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9EA36201EF for ; Fri, 27 Jun 2014 15:52:22 +0000 (UTC) Received: by mail-ig0-f199.google.com with SMTP id h18sf7613257igc.2 for ; Fri, 27 Jun 2014 08:52:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:date:from:to:cc:subject:message-id :reply-to:references:mime-version:content-type:content-disposition :in-reply-to:user-agent:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=LoU2qddpQRRZhBlZw7HQHsOV2Ta/i0hz/k/RZVqddII=; b=R0Dl6VZ5Qq2md6nEI5tEZzBQlLHm1GOQZdUp4k04DuxS/+MZDVsQqJpyZOPWPnMm3V QuBr3nDA+j3OHxRMGajr8nmfx37xJb41JEGYDA5ZK83RYOe8dEHKMqRX+pzFfz5lwqbp bV4xhgRTTmVGN6Zp/P8nWzFq2BXTmwTgAHDWRi0ixKsg6YchqounLruNBSIhiDuMoL25 EfU+U5tRw0drnIGSx2+okHkEyV56edcdnBVZNsrcqE9+byZtFB4BkWoxFUtHHs5JNuxu ieJuBoyitmy8Zfjk/8s9jS84K7HZsVjgCYK2F5rKaEziedTlbFbUqDaZ7U2owr2Enb/z c1Gg== X-Gm-Message-State: ALoCoQnV0Yz42/OJsC8Uo2snAqRuLJPi0wtlPIuokfK8V/kIqmzcBTGnxS4o8GjZhzUY33pzUXaF X-Received: by 10.182.91.79 with SMTP id cc15mr12981532obb.13.1403884341756; Fri, 27 Jun 2014 08:52:21 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.49.193 with SMTP id q59ls685337qga.91.gmail; Fri, 27 Jun 2014 08:52:21 -0700 (PDT) X-Received: by 10.52.241.76 with SMTP id wg12mr17379921vdc.5.1403884341652; Fri, 27 Jun 2014 08:52:21 -0700 (PDT) Received: from mail-vc0-f181.google.com (mail-vc0-f181.google.com [209.85.220.181]) by mx.google.com with ESMTPS id r4si6600094vdp.12.2014.06.27.08.52.21 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 27 Jun 2014 08:52:21 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.181 as permitted sender) client-ip=209.85.220.181; Received: by mail-vc0-f181.google.com with SMTP id il7so5193039vcb.26 for ; Fri, 27 Jun 2014 08:52:21 -0700 (PDT) X-Received: by 10.53.8.162 with SMTP id dl2mr17475944vdd.24.1403884341528; Fri, 27 Jun 2014 08:52:21 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp117740vcb; Fri, 27 Jun 2014 08:52:20 -0700 (PDT) X-Received: by 10.66.228.37 with SMTP id sf5mr31888969pac.19.1403884340107; Fri, 27 Jun 2014 08:52:20 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qp1si14422778pac.31.2014.06.27.08.52.19; Fri, 27 Jun 2014 08:52:19 -0700 (PDT) Received-SPF: none (google.com: linux-usb-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753403AbaF0PwS (ORCPT + 3 others); Fri, 27 Jun 2014 11:52:18 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:43543 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753187AbaF0PwS (ORCPT ); Fri, 27 Jun 2014 11:52:18 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id s5RFq70k025049; Fri, 27 Jun 2014 10:52:07 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id s5RFq7TO018093; Fri, 27 Jun 2014 10:52:07 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.174.1; Fri, 27 Jun 2014 10:52:06 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id s5RFq6sW021435; Fri, 27 Jun 2014 10:52:06 -0500 Date: Fri, 27 Jun 2014 10:52:02 -0500 From: Felipe Balbi To: Pedro Erencia CC: , Alan Stern , Subject: Re: musb + full speed device Message-ID: <20140627155201.GJ8069@saruman.home> Reply-To: References: <53A699C5.9040803@gmail.com> <20140623144156.GA16963@saruman.home> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-usb-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: balbi@ti.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.181 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Hi, (please avoid top-posting) On Wed, Jun 25, 2014 at 10:59:57AM +0200, Pedro Erencia wrote: > Hi, > > Thanks for the suggestions Felipe. > > We are not processing our packets in during giveback, but anyway I've > tried your patch and it results in a very little (~5%) increase in > transfer rate. > > I think it is a latency issue, since running the application reports a > 97% idle time on top. > > The profiling of the kernel functions gives the following > > > 30238 total 0.0046 > 22903 omap3_enter_idle 77.3750 hmm... can you disable autoidle on musb and see if it helps. The simplest way is to an unbalanced pm_runtime_get_sync() in the driver, so that usage counter never reaches zero. You can also just try setting a larger timeout: diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index eff3c5c..7e28017 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c @@ -1893,7 +1893,7 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl) } pm_runtime_use_autosuspend(musb->controller); - pm_runtime_set_autosuspend_delay(musb->controller, 200); + pm_runtime_set_autosuspend_delay(musb->controller, 5000); pm_runtime_enable(musb->controller); spin_lock_init(&musb->lock);