Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3631903ybl; Mon, 12 Aug 2019 03:53:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqxrwzgO2FmFMk6QYmUpFr4BHeQYftkIf72p6io6zAIAtPb5XDRazwLL80b93Ehb1MvmdLA+ X-Received: by 2002:a17:902:4623:: with SMTP id o32mr31782157pld.112.1565607203261; Mon, 12 Aug 2019 03:53:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565607203; cv=none; d=google.com; s=arc-20160816; b=v189MZl0mLmsRjOWRyCVHdMawdIakXlNrvWxi6jf6aN0tnNxVLC/F2LuhraFrYtULv zWKFy81p+/lWC6pxjtkpANUdmeT9lNnPFyCEVlHDkFzVDjMHQ89JR6oKL9MT9zLOZS4j 4q2AkGCaAmP1lH6Jvavig1I/DDlfpL22uig9bUt8aiQPWFxooger7UOJWHrlX9sMybz4 7Q5n8uOmfWfCrX9mrdopKgezZ6rmpQCFcv5UZP5Jv2xI3naCFyiyC+qyjAlpT+EcEtKB ekAk5g2N/R9ACwezjdJHAyL8gSeRvaMVATV0lGBxvdf15hRzfuntVjqqu7J1HtNyJhqW VjQw== 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:organization:from:references:cc:to:subject; bh=OUuzzILL8IPI2aD/NNmyMu4VY2Ws6LxPd2GTnd36dUk=; b=ZDrn4KUu/hS/0s8hizxBnsMZUhhDg65CYR+/PptQCELUcuBaRLjE/OADSY0gPSy6KY Tqgt1Eku3mJKu9kOMuyDv2AE2hcdUeE6kk3sOwjTxaNWLg91iTN/IxS+59zPSnZwm7mb 8dii05Km51P88COna8dnDnMIxykW7IDYa0Rlff0HsoET1BKScbSc/w0RWr/Ys5qFLzfM Onq1N0iZEzPQj0vjfdJP9ahnk/DWg/fBgXaF3ATgNSDZP3HaKwaoXNNdl+9mQGDKgltc XcPD3Ubb+qje4SNUZ3Brehqi2kscmdNT3I3PvfIevgDwi5FlzM60Pou0ObaXe73M7dks lNaA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x10si6439767pjt.98.2019.08.12.03.53.08; Mon, 12 Aug 2019 03:53:23 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728127AbfHLKwF (ORCPT + 99 others); Mon, 12 Aug 2019 06:52:05 -0400 Received: from mga17.intel.com ([192.55.52.151]:64367 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727981AbfHLKwF (ORCPT ); Mon, 12 Aug 2019 06:52:05 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Aug 2019 03:52:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,377,1559545200"; d="scan'208";a="204671674" Received: from ahunter-desktop.fi.intel.com (HELO [10.237.72.122]) ([10.237.72.122]) by fmsmga002.fm.intel.com with ESMTP; 12 Aug 2019 03:52:01 -0700 Subject: Re: [RFC PATCH 0/7] Add MMC packed function To: Baolin Wang Cc: Jens Axboe , Ulf Hansson , Chunyan Zhang , Orson Zhai , Arnd Bergmann , Linus Walleij , Vincent Guittot , linux-mmc , LKML , linux-block@vger.kernel.org References: <8abff7d6-0a3e-efe7-e8ec-9309fada9121@intel.com> From: Adrian Hunter Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki Message-ID: <8e447a05-a859-5c71-911f-b5a0a907e8a0@intel.com> Date: Mon, 12 Aug 2019 13:50:54 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12/08/19 12:44 PM, Baolin Wang wrote: > 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. > I meant did you consider using the CQE interface instead of creating another one?