Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp7601254rdb; Thu, 4 Jan 2024 01:25:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IHn8eNqPhk4nVGt6VxrSIMavT6Zqw0wV7RGpWsUnmJgCPEI4NzaUwQje2HGl5SctEMl8MOw X-Received: by 2002:a50:9fc8:0:b0:557:10ff:4979 with SMTP id c66-20020a509fc8000000b0055710ff4979mr25047edf.41.1704360318222; Thu, 04 Jan 2024 01:25:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704360318; cv=none; d=google.com; s=arc-20160816; b=OjZxYPr4qez8RzXd4TUBn/HTBiDnMKwZYNERAkFkIkH51/TnWbMgjOWt79G5yUy5kB MOvLJXwKZbSkUFcqeNNJclAPHoO91+LsoMIUf8qyqH0SxrbRi+7IHMYhtNx4QpuPMjgY pA+TYebPw27Yf9LOCn22r871EuzQI/h02KzHRzXe0M+Whomu+qYPLdWyca6MUoxxRhA6 zHt0I4aUDaVqtPboEDI+p7QvtC8MA+BqD3P2j81c0TPJc1h6K5RHippegF1Rv/lACDUq ZbxMakCbbwyTvQle/5Cj1OUK8FjFmAq5cQ9wGslIkZdVdQcfnXdJyKTIVDvn26jEtR8V uBPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=kjPTI7ysl0iSAq2AYi3fevyAsX4EHOwem9umcg1WYwc=; fh=WV44tj2YbP+jPoblbYP1zwHFBTUVTVmHdADJa94OTEM=; b=gyRS8elD5BK1Z+qVPKKTLUifwVLrwmd1f5tcojmb+6CbQziQpEFuKZnnzcrD1pXzR6 g2NjgNP80K8jPa8GVdQYB3HlpZUStvCil3dquJ5mDnrxGMC8M9qkxRGKk06up4TYq/6y oHTsuFSubwZuQ4A+dodIi0vZCSdcsXgtMbeo38Vg67lo6mc0OxsaibS0ESczeFiQzQyL JrtYb4VSeJHs+Nc26hus2PWZXN0JCnvHfrJE2sDCw38Iqpu60wnf2dldoZCE5BVukz4T 9lrfrt2YX6aqz91XMalpJfWoiVG0G502U2MqrCmrszLEkNiaE8eHmHVDzryYgAd3FtEy G3fQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=MDVLS0hr; spf=pass (google.com: domain of linux-kernel+bounces-16434-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16434-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id r10-20020a50d68a000000b005545e655cf7si11646238edi.487.2024.01.04.01.25.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 01:25:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-16434-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=MDVLS0hr; spf=pass (google.com: domain of linux-kernel+bounces-16434-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16434-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id C83241F24F90 for ; Thu, 4 Jan 2024 09:25:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 706E72030F; Thu, 4 Jan 2024 09:25:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="MDVLS0hr" X-Original-To: linux-kernel@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 63D002031C; Thu, 4 Jan 2024 09:25:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1704360306; x=1735896306; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=iH8mZfy4z3bXeluQ3SiXbNx9xlfsEzn+JeEJgF3IPfM=; b=MDVLS0hruaVcxV9n/BbPgU6mwXCRm56pnERFCT9Mnu2MDJmQiK17FwTn FPt2C/tyvMAtg4k928Q5BB/Gu5JaXn4Y4YkALih7cdAzyxx19artVDbUt aoz1oWOVoL/0giMh09utFks6t5AkFI/JqM92+/GvXoRet7Mp+0OP6DPUr Tdx43dh1USryRjHY7QK3hyQXArKze3WoscbVK1Ms9TSO/hdDDlyqOvMq9 tJx70DVGmOOz1v2R49yHmxPid7bqSCjxlKx1e2pRlEfGlu5WLnenJ/2Pf MUhACQY/dX5tEQSpQC3WczeEcOFizWjEtpywDxrei/eo7V9WJBKpXIcqg g==; X-IronPort-AV: E=McAfee;i="6600,9927,10942"; a="400972584" X-IronPort-AV: E=Sophos;i="6.04,330,1695711600"; d="scan'208";a="400972584" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jan 2024 01:25:05 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10942"; a="814571457" X-IronPort-AV: E=Sophos;i="6.04,330,1695711600"; d="scan'208";a="814571457" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO [10.0.2.15]) ([10.252.35.85]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jan 2024 01:25:03 -0800 Message-ID: Date: Thu, 4 Jan 2024 11:24:59 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1 1/1] mmc: sdhci-of-dwcmshc: Enable timeout quirk for BlueField-3 SoC Content-Language: en-US To: Liming Sun , Christian Loehle , Ulf Hansson , David Thompson Cc: "linux-mmc@vger.kernel.org" , "linux-kernel@vger.kernel.org" References: <6082b74cbc681e8c24354828941361f4f4294242.1700315051.git.limings@nvidia.com> <3912dd1e-b15b-49a9-9c91-88e00e986efd@arm.com> <66aa74f5-0613-49eb-80d3-ce4381f717ae@intel.com> From: Adrian Hunter Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 19/12/23 23:18, Liming Sun wrote: > > >> -----Original Message----- >> From: Adrian Hunter >> Sent: Monday, December 11, 2023 6:39 AM >> To: Liming Sun ; Christian Loehle >> ; Ulf Hansson ; David >> Thompson >> Cc: linux-mmc@vger.kernel.org; linux-kernel@vger.kernel.org >> Subject: Re: [PATCH v1 1/1] mmc: sdhci-of-dwcmshc: Enable timeout quirk for >> BlueField-3 SoC >> >> On 30/11/23 15:19, Liming Sun wrote: >>> >>> >>>> -----Original Message----- >>>> From: Christian Loehle >>>> Sent: Monday, November 27, 2023 8:36 AM >>>> To: Liming Sun ; Adrian Hunter >>>> ; Ulf Hansson ; David >>>> Thompson >>>> Cc: linux-mmc@vger.kernel.org; linux-kernel@vger.kernel.org >>>> Subject: Re: [PATCH v1 1/1] mmc: sdhci-of-dwcmshc: Enable timeout quirk >> for >>>> BlueField-3 SoC >>>> >>>> On 18/11/2023 13:46, Liming Sun wrote: >>>>> This commit enables SDHCI_QUIRK_BROKEN_TIMEOUT_VAL to solve the >>>>> intermittent eMMC timeout issue reported on some cards under eMMC >>>>> stress test. >>>>> >>>>> Reported error message: >>>>> dwcmshc MLNXBF30:00: __mmc_blk_ioctl_cmd: data error -110 >>>>> >>>>> Signed-off-by: Liming Sun >>>>> --- >>>>> drivers/mmc/host/sdhci-of-dwcmshc.c | 3 ++- >>>>> 1 file changed, 2 insertions(+), 1 deletion(-) >>>>> >>>>> diff --git a/drivers/mmc/host/sdhci-of-dwcmshc.c >>>> b/drivers/mmc/host/sdhci-of-dwcmshc.c >>>>> index 3a3bae6948a8..3c8fe8aec558 100644 >>>>> --- a/drivers/mmc/host/sdhci-of-dwcmshc.c >>>>> +++ b/drivers/mmc/host/sdhci-of-dwcmshc.c >>>>> @@ -365,7 +365,8 @@ static const struct sdhci_pltfm_data >>>> sdhci_dwcmshc_pdata = { >>>>> #ifdef CONFIG_ACPI >>>>> static const struct sdhci_pltfm_data sdhci_dwcmshc_bf3_pdata = { >>>>> .ops = &sdhci_dwcmshc_ops, >>>>> - .quirks = SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN, >>>>> + .quirks = SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN | >>>>> + SDHCI_QUIRK_BROKEN_TIMEOUT_VAL, >>>>> .quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN | >>>>> SDHCI_QUIRK2_ACMD23_BROKEN, >>>>> }; >>>> >>>> __mmc_blk_ioctl_cmd: data error ? >>>> What stresstest are you running that issues ioctl commands? >>>> On which commands does the timeout occur? >>>> Anyway you should be able to increase the timeout in ioctl structure >>>> directly, i.e. in userspace, or does that not work? >>> >>> It's running stress test with tool like "fio --name=randrw_stress_round_1 -- >> ioengine=libaio --direct=1 --time_based=1 --end_fsync=1 --ramp_time=5 -- >> norandommap=1 --randrepeat=0 --group_reporting=1 --numjobs=4 -- >> iodepth=128 --rw=randrw --overwrite=1 --runtime=36000 -- >> bssplit=4K/44:8K/1:12K/1:16K/1:24K/1:28K/1:32K/1:40K/32:64K/5:68K/7:72K >> /3:76K/3 --filename=/dev/mmcblk0" >>> The tool(application) is owned by user or with some standard tool. >> >> fio does not send mmc ioctls, so I am also a bit confused about >> how you get "__mmc_blk_ioctl_cmd: data error -110" ? > > There are other activities or background task going on. I assume it's other > MMC access which are affected by the stress FIO and got timeout. Would it make sense? > It depends on whether the IOCTL is overriding the timeout. In struct mmc_ioc_cmd there is data_timeout_ns which overrides the mmc core data timeout calculated by mmc_set_data_timeout(). There is also cmd_timeout_ms for commands. You need to check whether "__mmc_blk_ioctl_cmd: data error -110" is because data_timeout_ns was set too low (but non-zero) by the caller of the IOCTL.