Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp549803imm; Tue, 15 May 2018 05:47:20 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrxRmoYa+4CjAuqcLTX/XhtfQT0DFE/8rpu2TXdxcZ7syr6ukzca+OezcNs5Xt81WZxMyMh X-Received: by 2002:a17:902:7c95:: with SMTP id y21-v6mr14304340pll.76.1526388440599; Tue, 15 May 2018 05:47:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526388440; cv=none; d=google.com; s=arc-20160816; b=d8jcOcfNHarQDPehXke1sezxat2ib72qinLUuDnRwxQmSmtdSqcqRHXJF3Y9wYK28/ 5Yw3UUvB0nSceKwmIAkRyNchcTDSx5hV7l+NR+Ffp5ACHrFSG7CQQpk/LbdaYaO0fGmw g2/rZ4Oz7/C9XVIooyxx8u2B8Pwo1HLCCVNVc3YVH1z5Op7zu0uFdMAvDvm2WtvHt8vS tCt+NpuG54AqE8jEQF9h+TOpQDmSlH3S1+tHX50C/LsQEARKOYcb37OB0vwbxRmHv/N8 rko5R7jglc0yotmL/5EE6GaMOgv4mkC0Do5aQJKTp0ChbJn4hJDdPeSWXkQRWsD4AsES fsvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=qltLQYXMDLXJftYtOQgV+MDs0yWHgY21DNlTaBQnq7Y=; b=XE9OWadPHo+PAZ9MP9ysIsdR2innxkYEhG1D9yJFAaJTFQIQjESph6GVlkO5rznhKg JmTP25UIg0+F58vjsP5RtZFL3iwRQRm/+zGsb6kqvw09EiiMcbbSWt1ajbdz3EpHuH5Y V3ZiOiK3OIokK0e9Y69Zo8IdTFr9Oe1iMmAAYhiwycdobatBEHXJIaQwxli+YgoWhvQ1 hKj43x9tzm0zYhDggie1ES2BlF+4FE7LYdtnzBAeNn3Fdso9B9S9OF0/yt+6ELaWH3D4 HUdenFZtBdPhfytrU7BDIGP32YB9jVZRIy+gB7MCtviqLZD2C4Merf2Ay00w0OWNsfhf u+lA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SUoT8NNI; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p14-v6si11289177pli.250.2018.05.15.05.47.06; Tue, 15 May 2018 05:47:20 -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=@linaro.org header.s=google header.b=SUoT8NNI; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752912AbeEOMjm (ORCPT + 99 others); Tue, 15 May 2018 08:39:42 -0400 Received: from mail-it0-f43.google.com ([209.85.214.43]:37984 "EHLO mail-it0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752307AbeEOMjk (ORCPT ); Tue, 15 May 2018 08:39:40 -0400 Received: by mail-it0-f43.google.com with SMTP id q4-v6so1026137ite.3 for ; Tue, 15 May 2018 05:39:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=qltLQYXMDLXJftYtOQgV+MDs0yWHgY21DNlTaBQnq7Y=; b=SUoT8NNIZR2TY9rj1KC5XHFLDM9XSUR0mfJNEWboxoNvBDiakcr5xzqPJneSWvElI+ NnX7Obs4oYkRem+cWhKCbQ8WJtTY5rtrppNXZ114aXsaPElffFxy7ZMxvDrtsK2osX9o eZ0dRrK6xLBEQ0znGsoCaNyWW8neE5gFhV2ok= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=qltLQYXMDLXJftYtOQgV+MDs0yWHgY21DNlTaBQnq7Y=; b=lHgpTG5Em1ooJORwCM77PTRUGHUiPjAoy6K3iY0V5u3ebmQGaSvIpgr/J9iuATTggO RFoaRK0nhMJJIfbykhUvQHFJeUqZ/lN2g4jb24LrVCmywkG31HRG2iUd55N2eJIW33Gv RMdF6scpVCzRNcQfhooz1v7cYIWGPbHE6RoTiXF1zY19GEdCrsbO2wq217d/m9wZGZB6 psOCPRyiCyhrydlNoiQ3Bofd+QJbk7zqAflbGrk+RyGnuvNLRFLOdwWN2GYTus7yYzys gpQ2NpBtVDpHW4P2G0sYz78MygwGIcwUBp4tn3R4DtOyi/cjFlScGJheYe/vDRHShXCN d4DA== X-Gm-Message-State: ALKqPwfd/zOCysVKZN5XFrGKJk9AT06UGbCz6iFGXtlfqCJCm1NM76Dj u46ZwHA+1bC80GI+95os2iKURwoRxzm6ME9jR4AkSA== X-Received: by 2002:a24:6f0e:: with SMTP id x14-v6mr13772166itb.38.1526387980016; Tue, 15 May 2018 05:39:40 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a4f:4c95:0:0:0:0:0 with HTTP; Tue, 15 May 2018 05:39:39 -0700 (PDT) In-Reply-To: <0ea1d2bf-fa0f-4b3d-556a-5dca5afbf2a9@ti.com> References: <0ea1d2bf-fa0f-4b3d-556a-5dca5afbf2a9@ti.com> From: Linus Walleij Date: Tue, 15 May 2018 14:39:39 +0200 Message-ID: Subject: Re: MMC performance degradation due to too many requests To: Faiz Abbas Cc: "linux-kernel@vger.kernel.org" , linux-omap , linux-mmc , Ulf Hansson Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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 - You were previously enabling CONFIG_MMC_BLOCK_BOUNCE I am a bit confused since omap_hsmmc sets max_segs to 64, indicating that it can do scatter-gather, and the bounce buffer code will only every kick in if max_segs == 1. The solution we created for SDHCI is: commit bd9b902798ab14d19ca116b10bde581ddff8f905 "mmc: sdhci: Implement an SDHCI-specific bounce buffer" i.e. we push this bouncing down to the driver and does not try to do it in the MMC core. I'd be happy to come up with something OMAP-specific as well if you can only help me to figure out the code path leading to max_segs == 1. Yours, Linus Walleij