Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp861071imu; Tue, 20 Nov 2018 08:04:00 -0800 (PST) X-Google-Smtp-Source: AFSGD/XTTN9AFhQn2SQBVScyjemu1duWiJjrsLQPXf5cnZeLvV5wQ+MHjKAdP8FvToWdVR51/c1G X-Received: by 2002:a65:5286:: with SMTP id y6mr2380329pgp.439.1542729840840; Tue, 20 Nov 2018 08:04:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542729840; cv=none; d=google.com; s=arc-20160816; b=ML8xlAHFeKX55qsQW+0Xdb/2NinJwq67VQRi6nmOo0/Rxr7goZC6pUKGYrgxX6an9h TcXxzSMp2PgFNS3z1NxFhtMLOPaMRyJ7G3VrSqxH/mJCyF4YYS1qJZx2kFp83fC9IEMp t2H/5bySlDZkOFJz475G6Ns1AJheECi3xDr2T6xe8PjdaS9r3xBdw54n3KCgT0Ukxq90 S+jEdb75kjZGNFOpV9J7NQAKxgr5hlOzBjh6Cf1x1ThSwM919B2qrMXpofZO87duCr+X 3G2IRnQYrRlitdM3e1+vvAeDJPjoR6Lqhnae1s1ixgADeYH1haNidzuxCH2L/47R1TcV rDxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent :content-transfer-encoding:organization:references:in-reply-to:date :cc:to:from:subject:message-id; bh=Ll05ZQyOdtaCutkRWYcCP8uVSCZWgm04bTStqEDusgQ=; b=a1PRrr9CfEOfL/9UpZZQJmJ5VlI9bfDOy6y3rqnI7S4lkSW6pSfWrjJmDixP4Yvu3N QkfIsz0nCPfB1Afq8HGEF3dBIOhx0vat6WWE+fnI2fYeB9FmLji6mlfiY7PDwWXxJzYI M5JWJ/F8sBxCIRZ6Z99swWdQdoXS2RuPb9d+pvyiWwB+uYQNGtEjGO/PwBR1u4tGa/mI bkJA7tYFfv/hLdgjTG/LaoEgdZLbj+AAALHElzoKSDTm8leZXKPlP5rktIfVffM4mudB ZdC2/jOnlTYnyJNa0enMmZ/Pr43pZnGcHLJ6NCiXk4guPZBq9/gIEqJj1cxLsIl1b36P I/Ww== 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=collabora.co.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n17si42121240pgj.191.2018.11.20.08.03.44; Tue, 20 Nov 2018 08:04:00 -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; 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=collabora.co.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730123AbeKUBZB convert rfc822-to-8bit (ORCPT + 99 others); Tue, 20 Nov 2018 20:25:01 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:44230 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730098AbeKUBZA (ORCPT ); Tue, 20 Nov 2018 20:25:00 -0500 Received: from beast.luon.net (unknown [IPv6:2001:470:78b1:0:40e2:7ff:fef4:3122]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: sjoerd) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id 2E9B02722C6; Tue, 20 Nov 2018 14:55:27 +0000 (GMT) Received: by beast.luon.net (Postfix, from userid 1000) id 79F813E238F; Tue, 20 Nov 2018 15:55:24 +0100 (CET) Message-ID: <9f63ea203ec54a86f1edc636e44acc9b5e51aea1.camel@collabora.co.uk> Subject: Re: [PATCH] mmc: core: Remove timeout when enabling cache From: Sjoerd Simons To: Ulf Hansson 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 Date: Tue, 20 Nov 2018 15:55:24 +0100 In-Reply-To: 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> Organization: Collabora Ltd. Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.30.1-1 Mime-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2018-11-20 at 15:24 +0100, Ulf Hansson wrote: > 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. Correct. With hard power off i mean cutting the power to the board in some way. When doing a gracefull power off, the issue does not occur on my boards (cache on is fast). Presumably as the eMMC got its cache flushed as part of the shutdown procedure.. > > > 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. > > [...] Then i'm probably just being dense, but i'm unsure what the issue is with waiting for 10 minuts in this case. Apart from having to wait for 10 minutes before the user gets an indication in the kernel that the card is not usable? -- Sjoerd Simons Collabora Ltd.