From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964839AbcFMGdI (ORCPT ); Mon, 13 Jun 2016 02:33:08 -0400 Received: from mga01.intel.com ([192.55.52.88]:6882 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933353AbcFMGdG (ORCPT ); Mon, 13 Jun 2016 02:33:06 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,465,1459839600"; d="scan'208";a="1000659592" From: Adrian Hunter Subject: Re: [PATCH] mmc: core: add auto bkops support To: Shawn Lin References: <1465182439-27963-1-git-send-email-shawn.lin@rock-chips.com> Cc: Ulf Hansson , Jaehoon Chung , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Doug Anderson , linux-rockchip@lists.infradead.org, Alex Lemberg Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki Message-ID: <575E52AC.6000902@intel.com> Date: Mon, 13 Jun 2016 09:29:00 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: <1465182439-27963-1-git-send-email-shawn.lin@rock-chips.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 06/06/16 06:07, Shawn Lin wrote: > JEDEC eMMC v5.1 introduce an autonomously initiated method > for background operations. > > Host that wants to enable the device to perform background > operations during device idle time, should signal the device > by setting AUTO_EN in BKOPS_EN field EXT_CSD[163] to 1b. When > this bit is set, the device may start or stop background operations > whenever it sees fit, without any notification to the host. > > When AUTO_EN bit is set, the host should keep the device power > active. The host may set or clear this bit at any time based on > its power constraints or other considerations. > > Currently the manual bkops is only be used under the async req > circumstances and it's a bit complicated to be controlled as the > perfect method is that we should do some idle monitor just as rpm > and send HPI each time if receiving rd/wr req. But it will impact > performance significantly, especially for random iops since the > weight of executing HPI against r/w small piece of LBAs is > nonnegligible. > > So we now prefer to select the auto one unconditionally if supported > which makes it as simple as possible. It should really good enough > for devices to manage its internal policy for bkops rather than the > host, which makes us believe that we could achieve the best > performance for all the devices implementing auto bkops and the only > thing we should do is to disable it when cutting off the power. Do you know if there is really a requirement to do that? Because then, what is the point of power off notification? And why is AUTO_EN persistent across power failure?