Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3244869imm; Thu, 17 May 2018 05:53:31 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqr5yFRKYRxtTu8ELDDCN0OHArFxsuvuF3dvunqdwgALcrEe55C7vKpWs8byEnAea6re63d X-Received: by 2002:a17:902:bf08:: with SMTP id bi8-v6mr5040837plb.353.1526561611894; Thu, 17 May 2018 05:53:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526561611; cv=none; d=google.com; s=arc-20160816; b=DDNpffS79UjZDxdmgx/9/ucQ/Ojr3ruwBsHN4tlLRcpJu6HyZF5YLBqtYI8ZL9P8GT LGI1r+tA71QiAIzGI/mTZck03ZYxRUCs2wXtBXs4y1VtJ1TIJ0jlXKqGFv7vzX+qFREy lBA3lmLBc7FcOXfjC5ixIhBKG70Xz0141hgwARC0M9MW+0mg6ZNwWl6Kl7Xgy+NYqiLM J+lZDACyMAIjQzhvqHOI8DEjTWpBAoUuqM6OyIGTWzxLdQ/fHa2kLcMkKs4FSOnphuS1 riYCiR3vZA+GTra0iVdmAzuf5a0GCjyhNrLi81S2coPalJ+aio8NuvULDDAgRVNz80Jf Ymug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=fGLLYb1x28M3t2oC9VNWetH7JM7DCUJitntfa5mirfk=; b=IFhXKUgFfzLaP1yxZ033sF195JIApxUDV9yRy5PjEVlK0+T1QGD6l06f+0cVpQiu2l iyhuCo0LeGVpYyDyIcQ15YldiKlWAhKO40D7b/rXIq6aSVihSBnvgRi/W1AqwLsoXBRL 7RHnyF5WHURKoWnXgD0zwcmed2PbvPqVHluATAomWNV1xNh3rb7mxyTVD/qeeSGXRdCj D3WEXyXJuyT/zMBf+ok4HORDKNZHt92aifQGLuzsdOM3cJivXPx7EdIqvuf+4qRUdvkI QIh5nZQhESfcGCImv6sv14cj4f+OkGeLEeUpkGhIKba/Qhlf0A4GCo3dxUFydFS5m698 IeWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=wZUSmLH6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a33-v6si5029803pld.167.2018.05.17.05.53.17; Thu, 17 May 2018 05:53:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=wZUSmLH6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752112AbeEQMwl (ORCPT + 99 others); Thu, 17 May 2018 08:52:41 -0400 Received: from lelnx193.ext.ti.com ([198.47.27.77]:13950 "EHLO lelnx193.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751017AbeEQMwj (ORCPT ); Thu, 17 May 2018 08:52:39 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id w4HCqanO005418; Thu, 17 May 2018 07:52:36 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1526561556; bh=fGLLYb1x28M3t2oC9VNWetH7JM7DCUJitntfa5mirfk=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=wZUSmLH6k6BsYubrgjZzG78fYk+H7Mbamtnu4H9xuF7BBBtTveo0V4XtG2jeL2Frv vzMolOJrzB4PDLubsspIhIRR0bmzCHT12bhkHD8/BLuuEwwYSv8LRKK81/ZfRr5Ww3 GZvWgPR5yc5ZdWiODMy4J/mcYJKO2i38QxjgDUJs= Received: from DFLE113.ent.ti.com (dfle113.ent.ti.com [10.64.6.34]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w4HCqaPo015906; Thu, 17 May 2018 07:52:36 -0500 Received: from DFLE104.ent.ti.com (10.64.6.25) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Thu, 17 May 2018 07:52:36 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Thu, 17 May 2018 07:52:36 -0500 Received: from [172.24.190.215] (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w4HCqXgV016826; Thu, 17 May 2018 07:52:34 -0500 Subject: Re: MMC performance degradation due to too many requests To: Linus Walleij , Will Newton , ext Tony Lindgren CC: "linux-kernel@vger.kernel.org" , linux-omap , linux-mmc , Ulf Hansson References: <0ea1d2bf-fa0f-4b3d-556a-5dca5afbf2a9@ti.com> <3e2c96fa-273e-192f-1caf-788de7659592@ti.com> From: Faiz Abbas Message-ID: <44f591d4-908b-9476-6deb-0ddf77794b49@ti.com> Date: Thu, 17 May 2018 18:24:11 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Wednesday 16 May 2018 07:59 PM, Linus Walleij wrote: > On Tue, May 15, 2018 at 5:11 PM, Faiz Abbas wrote: >> On Tuesday 15 May 2018 06:09 PM, Linus Walleij wrote: >>> On Mon, May 14, 2018 at 1:30 PM, Faiz Abbas wrote: >>> >>>> Also, I see many times the number of interrupts for mmc1 in 4.14. >>> (...) >>>> I also printed out the size of the DMA transfers in the omap_hsmmc >>>> driver during the dd command. I see that the maximum size of the dma >>>> transfer has decreased from 1 MB to 256kB between 4.13 and 4.14. >>> >>> This seems like my fault for removing the bounce buffer. >>> (The name bounce buffer is misleading, I suspect the right >>> term for what is was doing was "merge buffer" or something, >>> coalescing physically consecutive requests.) >>> >>> commit de3ee99b097dd51938276e3af388cd4ad0f2750a >>> "mmc: Delete bounce buffer handling" >>> should be the culprit. >> >> I don't think so. I checked out to the commit before that and see that >> the interrupts are still too high. > > OK phew then I'm safe :) > >>> The bounce buffer only makes any performance impact if the >>> host DMA controller is unable to handle scatter-gather lists >>> so the number of segments is set down to 1. >>> >>> Can you verifty that: >>> - mmc->max_segs == 1 >> >> No. It is 64 in v4.14. It was 1024 in v4.13. > > This smells like: > commit 9442400486a1ec28915e9ab31517a5665ed35705 > "mmc: omap_hsmmc: Reduce max_segs for reliability" > Yes. I was able to bisect the number of interrupts to the same commit as well. On top of v4.14, *Without revert*: https://pastebin.ubuntu.com/p/VJgvzrCP9g/ avg speed for 100 MB transfer: 3.7 MBps Number of interrupts per 100 MB transfer: ~2000 *After revert*: https://pastebin.ubuntu.com/p/ktgTmKVKkN/ avg speed for 100 MB transfer: 4.6 MBps Number of interrupts per 100 MB transfer: ~500 Also, I'm getting 1M buffers in the omap_hsmmc DMA now. @Will will it be OK to change the mmc_segs back to 1024? Thanks, Faiz