Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3571365ybl; Mon, 12 Aug 2019 02:47:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqweGelfeZt8lxB9G6Rgk5EmtbM64IBNVoUdj6L2i5lOHHZY4/c31AV9A9pMr2pEtHF2Le6M X-Received: by 2002:a17:90a:3651:: with SMTP id s75mr22120054pjb.13.1565603224684; Mon, 12 Aug 2019 02:47:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565603224; cv=none; d=google.com; s=arc-20160816; b=MYCAkM7hCtjyJu1FoVYj0tZmlIVNM+P6mM0+pRk4wah/wMViWZKuBD9VC0HpetnuW+ 9FVvBxFdyPdhirCkb8Joq1S13YsL16mlyASEUxw1Wk/VsiAq/Ev3ryd2SifwTDYU9bwK b7pgyLkJrkZKYoonIkSRPIkC7aLsxCQSN481/ght2/YGxSCQ8bWELNb7PB1RjtjPkUPp ut4L+VxImiUytnkNkuJRQuG3d0FnI8R8vNYbw97iFTPYCmkZtuXXIByj4RgMVh1Wtzvw Y0ENoJkkw9Km0XT3s0ypYBtH6VUyf7zBpaSQUGN14xairvsnoleORY809qG8Iv+Z88H/ tI/A== 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 :in-reply-to:references:mime-version:dkim-signature; bh=emXyL+F/wH+sxcGpBQLqfGU1iXCvM/vOXIvgqLtgxVw=; b=A8xCbtkkA7jrv3J7dB12oi9spqe6RcmcJJ8b5wDOJSOwylOuebdutOf+fH3fAg4XsZ urb7YhHF2pF5BvPHwYAY7hH0Kzr5uAp1+A5NBFwKWRQMhVFVqBPwf6uPMwvjUBL2CgaI cJOsgmx+7Ap4CxdDuSg/aUzZGf5+9LueLcu5Q9fhwya/6ucrRpHKn2egz9QgLCFU21x8 kb7bB5h3IoDSThYiyvTLZv3rWli3rhYCh5m68B/J/CHlwK4oyvRWjZ7i3F+83jPHx1ca hpmht3bjnBQle76U5KeRSG9fhixGW9anyudmNl2jnpildZchaQL6oLY7pGkRi4Srxo3w fALQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CEerFixs; 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 38si5753529pln.426.2019.08.12.02.46.49; Mon, 12 Aug 2019 02:47:04 -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=CEerFixs; 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 S1727705AbfHLJor (ORCPT + 99 others); Mon, 12 Aug 2019 05:44:47 -0400 Received: from mail-ot1-f65.google.com ([209.85.210.65]:42275 "EHLO mail-ot1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727430AbfHLJop (ORCPT ); Mon, 12 Aug 2019 05:44:45 -0400 Received: by mail-ot1-f65.google.com with SMTP id j7so11756795ota.9 for ; Mon, 12 Aug 2019 02:44:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=emXyL+F/wH+sxcGpBQLqfGU1iXCvM/vOXIvgqLtgxVw=; b=CEerFixsNPVgu4xuOp6LvT5B0xdS4k5KLsyzpVfx39lh843gi/HnvK0KE7tgTPaO+t ALx9YKmBhJVROWOLV+aUTanVB4YKNKkdGVrLRNetC2f6QwZrdwaKHvRzdC4rkJzgKpVm bDGLSvkZ40MspeI71wmPX69UH7IMnR2nM5whHAajB8Cx0o6CRFYq4DKGlOV8UuU+9FED QrZu1vw9AJu1Z1diu0agKw1zGaR1b3oLslx/ErXOaI5+TfXrr97s7EQbq7oenKPVcaE1 cZpr/n4Dk5M3cVnGRTyOhiUNNyY4O3uYxKUL7m4zVCXjfJmO4vbNjgdxTT2Gt9FDiUPi QwPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=emXyL+F/wH+sxcGpBQLqfGU1iXCvM/vOXIvgqLtgxVw=; b=jEv4xmVfYeeAd9eeAbPI3AwbLr5Iuf1mpg5WsjOz9keMk8xFQ7evCUSUYMKgJmxL2X 8diCg1Ld5WAYHw0FG2J+e1EFdKQJMtLgfXMNT3Vr+fVjow2tbFxMXbazQeY4Gtp9O8+B 0D/tJCt3KKRQusvgxd7wOfxL+KEful7yW/iyXiOIQuWXTulz1KMVRw1bisq8eMQqVY35 FgZk0UoQ0/yIVEeYJaNaoOa0OL0xN6uk7MTb1xr6yif5cBV5DodIqu3KkxpRuWaj47zC FXAuNPVeERNdTf0dVehbh/I1v2h0vjF3fclAQngOD2QQ0VLSaFE3tU1qmDr5s7Cp7NH0 s4Yg== X-Gm-Message-State: APjAAAW6B1Ex0aPM1PMF39oz2r4VcCu0dV+APiGEdrLTx8EMC8chWQBR nEZXgIrOeF8bGPg0Ua+2z8y5an6NY6Gpwg+hwlLhtw== X-Received: by 2002:a9d:590d:: with SMTP id t13mr19125502oth.281.1565603084896; Mon, 12 Aug 2019 02:44:44 -0700 (PDT) MIME-Version: 1.0 References: <8abff7d6-0a3e-efe7-e8ec-9309fada9121@intel.com> In-Reply-To: <8abff7d6-0a3e-efe7-e8ec-9309fada9121@intel.com> From: Baolin Wang Date: Mon, 12 Aug 2019 17:44:33 +0800 Message-ID: Subject: Re: [RFC PATCH 0/7] Add MMC packed function To: Adrian Hunter Cc: Jens Axboe , Ulf Hansson , Chunyan Zhang , Orson Zhai , Arnd Bergmann , Linus Walleij , Vincent Guittot , linux-mmc , LKML , linux-block@vger.kernel.org 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 Hi Adrian, On Mon, 12 Aug 2019 at 16:59, Adrian Hunter wrote: > > On 12/08/19 8:20 AM, Baolin Wang wrote: > > Hi, > > > > On Mon, 22 Jul 2019 at 21:10, Baolin Wang wrote: > >> > >> Hi All, > >> > >> Now some SD/MMC controllers can support packed command or packed request, > >> that means it can package multiple requests to host controller to be handled > >> at one time, which can improve the I/O performence. Thus this patchset is > >> used to add the MMC packed function to support packed request or packed > >> command. > >> > >> In this patch set, I implemented the SD host ADMA3 transfer mode to support > >> packed request. The ADMA3 transfer mode can process a multi-block data transfer > >> by using a pair of command descriptor and ADMA2 descriptor. In future we can > >> easily expand the MMC packed function to support packed command. > >> > >> Below are some comparison data between packed request and non-packed request > >> with fio tool. The fio command I used is like below with changing the > >> '--rw' parameter and enabling the direct IO flag to measure the actual hardware > >> transfer speed. > >> > >> ./fio --filename=/dev/mmcblk0p30 --direct=1 --iodepth=20 --rw=read --bs=4K --size=512M --group_reporting --numjobs=20 --name=test_read > >> > >> My eMMC card working at HS400 Enhanced strobe mode: > >> [ 2.229856] mmc0: new HS400 Enhanced strobe MMC card at address 0001 > >> [ 2.237566] mmcblk0: mmc0:0001 HBG4a2 29.1 GiB > >> [ 2.242621] mmcblk0boot0: mmc0:0001 HBG4a2 partition 1 4.00 MiB > >> [ 2.249110] mmcblk0boot1: mmc0:0001 HBG4a2 partition 2 4.00 MiB > >> [ 2.255307] mmcblk0rpmb: mmc0:0001 HBG4a2 partition 3 4.00 MiB, chardev (248:0) > >> > >> 1. Non-packed request > >> I tested 3 times for each case and output a average speed. > >> > >> 1) Sequential read: > >> Speed: 28.9MiB/s, 26.4MiB/s, 30.9MiB/s > >> Average speed: 28.7MiB/s > > This seems surprising low for a HS400ES card. Do you know why that is? I've set the clock to 400M, but it seems the hardware did not output the corresponding clock. I will check my hardware. > >> > >> 2) Random read: > >> Speed: 18.2MiB/s, 8.9MiB/s, 15.8MiB/s > >> Average speed: 14.3MiB/s > >> > >> 3) Sequential write: > >> Speed: 21.1MiB/s, 27.9MiB/s, 25MiB/s > >> Average speed: 24.7MiB/s > >> > >> 4) Random write: > >> Speed: 21.5MiB/s, 18.1MiB/s, 18.1MiB/s > >> Average speed: 19.2MiB/s > >> > >> 2. Packed request > >> In packed request mode, I set the host controller can package maximum 10 > >> requests at one time (Actually I can increase the package number), and I > >> enabled read/write packed request mode. Also I tested 3 times for each > >> case and output a average speed. > >> > >> 1) Sequential read: > >> Speed: 165MiB/s, 167MiB/s, 164MiB/s > >> Average speed: 165.3MiB/s > >> > >> 2) Random read: > >> Speed: 147MiB/s, 141MiB/s, 144MiB/s > >> Average speed: 144MiB/s > >> > >> 3) Sequential write: > >> Speed: 87.8MiB/s, 89.1MiB/s, 90.0MiB/s > >> Average speed: 89MiB/s > >> > >> 4) Random write: > >> Speed: 90.9MiB/s, 89.8MiB/s, 90.4MiB/s > >> Average speed: 90.4MiB/s > >> > >> Form above data, we can see the packed request can improve the performance greatly. > >> Any comments are welcome. Thanks a lot. > > > > Any comments for this patch set? Thanks. > > Did you consider adapting the CQE interface? I am not very familiar with CQE, since my controller did not support it. But the MMC packed function had introduced some callbacks to help for different controllers to do packed request, so I think it is easy to adapt the CQE interface. -- Baolin Wang Best Regards