Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp749577imu; Tue, 20 Nov 2018 06:26:20 -0800 (PST) X-Google-Smtp-Source: AFSGD/XDFUwBLFzo5DyY9YN4ITX2XM9sfirxWJEjGk2ufbT6MesZ2N+mWu+8h+bv50KIhA0ncC4O X-Received: by 2002:a17:902:1e3:: with SMTP id b90-v6mr2396718plb.117.1542723980204; Tue, 20 Nov 2018 06:26:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542723980; cv=none; d=google.com; s=arc-20160816; b=o9sCfLi07M9HRLx/2T3FAU0EpxOUrsYw73Qa1v8goENjZNB7SYhu8inOlCfgAIMzJx PbM8RSeXPdcgBuFqIdmNMODV+1baD3btCSm3nb4F4Z0Fqv2V1BR5O9hhcld5KlQdOoac u1uvpnyuoKw9Y2Wz9K09QlQO9AtcUEB4JVZCb4lBKPFs8OqjC/5B3wdFtUmb/omllEhb j8skqPBLu46o9mXHKgIpUxZcjEX3njHE57wGBycEYwYfzhaPwtkaM6v3/kw3v7ePGGKa 5mDWuLuvVVf5HR/5IFIptSoY1Z1k3BnVBZRpeYmvwATjUW9CLrYgC7fUKmmNEHdvODnq HrFw== 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; bh=GgP7NTEdA3hdcGhYH7s3Ow22+K154MYSIIOWWzZDGsc=; b=Y3OuoiOfo2M4Nfpkf0nTF5yfTc0SqXeXFfdmsp6GyBfEf5RYhEH2NnXwUUL7HsoCa3 BCtxE75JNsuW5QHMq/LxhyqaZ9fW2Tr5nJHr6XzcMMVBZOcpowSb12xbFUgTOn09Cdjb qgpXSvKD3DSHn7rg/ipKFPiH7HF+7UEHUGQzKS1aw6JF0nN6h6SUMFDAeiX25I1vt4Rc jyGB1vpIE2VKs6NHrJWNDPXFiWRr6bQ0y/3Xp2iX2A3dwC7ny21gh4Eh4vvr3KmVFmJM wn2wM6mHPZbtYx99xAMfDsiLBTI2m9Avy/tqiEem+277r815+sKWSLmxH97QRx0ZX5go iNgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hANNkRZP; 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 y3-v6si42736409pfe.42.2018.11.20.06.26.04; Tue, 20 Nov 2018 06:26:20 -0800 (PST) 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=hANNkRZP; 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 S1729407AbeKUAyd (ORCPT + 99 others); Tue, 20 Nov 2018 19:54:33 -0500 Received: from mail-io1-f65.google.com ([209.85.166.65]:45069 "EHLO mail-io1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725995AbeKUAyd (ORCPT ); Tue, 20 Nov 2018 19:54:33 -0500 Received: by mail-io1-f65.google.com with SMTP id w7so1459466iom.12 for ; Tue, 20 Nov 2018 06:25:08 -0800 (PST) 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=GgP7NTEdA3hdcGhYH7s3Ow22+K154MYSIIOWWzZDGsc=; b=hANNkRZPCw9bA3VzMidiMrUMA4ubGu1qwtEctPNUXLCqNVSqNiTMJklGAOYwkErgOo jFyh82gXYsGwR9LXj7xZ1xJz3f1dye0aC6maHAwwNYNzhLSfVXFPoSRLksUhVV6Y7o7A fXqPuGPdK+qXOxDpWW7Y6AxsCdXIIhlZCcZpc= 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=GgP7NTEdA3hdcGhYH7s3Ow22+K154MYSIIOWWzZDGsc=; b=CsRb1qBeRLt43RP3lNG3tDZNotlbOHlEcwp3fKm/iKXOsIOGpbxGActvD3bRZZKKJZ 9UTqKc1yhc3BB2jktU7d9Wo905L3HqxCpT9jma76SVuk3Yp7TqcV11eXLJmLS4O6J1vV Si2/B4YbmXMly1epLDTvgtpq9EiKXPK/yZrK2/nDM9Wepf1o4gQqtfAN3hSkdypz8qsj BqG1I+eHajXi1vj0siI58hdd8MpraLvJqTh4y2IVfabEKqzNLSWhnJUZCCDUMcuXJu1C qZ5XDVW75qpxnfBcDOb6K6zdRxmhqbcDexsU72Et7WDW76/DofH7whQTqlHS8mqJoO84 N88Q== X-Gm-Message-State: AA+aEWahkgGRE0p1TZ9vdXhAGFm58LHXD28+wAfjFRccwZf4qSeq1zui ZtCBM98P+n6MxmpriIAriKRc0lFtg9KAoZbj0KYsCg== X-Received: by 2002:a6b:2c92:: with SMTP id s140mr1650571ios.218.1542723908428; Tue, 20 Nov 2018 06:25:08 -0800 (PST) MIME-Version: 1.0 Received: by 2002:a02:70c8:0:0:0:0:0 with HTTP; Tue, 20 Nov 2018 06:24:27 -0800 (PST) In-Reply-To: <515b72f2bd526d144fdc662126aa6e1e8484a25c.camel@collabora.co.uk> References: <20181106133007.12318-1-sjoerd.simons@collabora.co.uk> <9051c212-6e2a-bc39-3686-693e6cd87f1d@ti.com> <303b49cbb5b687d6b6a7ad4048eda459586c0806.camel@collabora.co.uk> <20181107084741.GA31092@kunai> <20181120102300.GA1056@kunai> <515b72f2bd526d144fdc662126aa6e1e8484a25c.camel@collabora.co.uk> From: Ulf Hansson Date: Tue, 20 Nov 2018 15:24:27 +0100 Message-ID: Subject: Re: [PATCH] mmc: core: Remove timeout when enabling cache To: Sjoerd Simons Cc: Wolfram Sang , Faiz Abbas , "linux-mmc@vger.kernel.org" , kernel@collabora.com, Linux Kernel Mailing List , Hongjie Fang , Bastian Stender , Kyle Roeschley , Wolfram Sang , Shawn Lin , Harish Jenny K N , Simon Horman , Hal Emmerich 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 20 November 2018 at 15:00, Sjoerd Simons wrote: > On Tue, 2018-11-20 at 14:08 +0100, Ulf Hansson wrote: >> + Hal Emmerich >> >> On 20 November 2018 at 12:38, Sjoerd Simons >> wrote: >> > On Tue, 2018-11-20 at 11:23 +0100, Wolfram Sang wrote: >> > > > > > >> > So if you know the pattern, or just happen to hit it often in e.g. >> > automated testing, it does show up during development. Otherwise it >> > can >> > appear to "happen once in a while randomly". >> >> I don't quite follow. As far as I understand, the extended timeout is >> needed when turning the cache on. >> >> The above seems more related to flushing the cache, no? Flushing have >> no timeout (also reported to be an issue [1]), which happens either >> at >> _mmc_hw_reset() or at _mmc_suspend(). >> >> What is the relation here? > > Yes it's the kinda of behaviour you would expect on a flush indeed! I > don't know what the card actaully does when turning the cache on, > whether it's actually flush of something persistent when turning the > cache on after a hard poweroff or doing some other validation. > > All i can share is what our testing seems to indicate, which is that > there is a wide spread in the time the card needs *and* there seems to > be strong correlation to the I/O activity before the hard power off and > the time taken by "cache on". So the hard power off, means that you are cutting the power to the platform and not doing a graceful power off? Just so I understand correctly. > >> > Unfortunately for me, it was really a case of getting reports of >> > some >> > boards started failing at some point which took a while to track >> > back. >> > Especially since it's a battery powered device (thus hard poweroffs >> > are >> > rather rare) and we allow the board manufactorer to select from >> > various >> > different eMMCs depending on price/available at build time... >> > >> > > Yet, if we add a quirk for that, then we should probably mention >> > > it >> > > in >> > > an error message when we hit -ETIMEDOUT for cache on ("does your >> > > card >> > > need this quirk?")? It can be pretty time consuming to track this >> > > down >> > > otherwise, I'd think. >> > >> > Yes please. It would be nice if someone happens to have the right >> > contacts with Micron to see if it's a known issue for their cards >> > in >> > general or just this one. >> > >> > Also would be good to have a timeout higher then 1 seconds (or for >> > these cards not have one?); On our testing thusfar we've seen >> > timeouts >> > up to 850ms, but it's impossible to ensure that that's the true >> > upper >> > bound. >> >> Using no limit of the timeout, would mean we may hang for ~10 minutes >> (MMC_OPS_TIMEOUT_MS) instead, no thanks. > > Probably a silly question, but would this actually cause e.g. boot to > hang while waiting for the card (assuming rootfs is somewhere else)? Nope. [...] Kind regards Uffe