Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1302672

[PATCH 3.16.y-ckt 027/126] mmc: remove bondage between REQ_META and reliable write

From Luis Henriques <luis.henriques@canonical.com>
Newsgroups linux.kernel
Subject [PATCH 3.16.y-ckt 027/126] mmc: remove bondage between REQ_META and reliable write
Date 2016-01-06 12:20 +0100
Message-ID <qNUif-nA-43@gated-at.bofh.it> (permalink)
References <qNTFw-8jf-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


3.16.7-ckt22 -stable review patch.  If anyone has any objections, please let me know.

------------------

From: Luca Porzio <lporzio@micron.com>

commit d3df0465db00cf4ed9f90d0bfc3b827d32b9c796 upstream.

Anytime a write operation is performed with Reliable Write flag enabled,
the eMMC device is enforced to bypass the cache and do a write to the
underling NVM device by Jedec specification; this causes a performance
penalty since write operations can't be optimized by the device cache.

In our tests, we replayed a typical mobile daily trace pattern and found
~9% overall time reduction in trace replay by using this patch. Also the
write ops within 4KB~64KB chunk size range get a 40~60% performance
improvement by using the patch (as this range of write chunks are the ones
affected by REQ_META).

This patch has been discussed in the Mobile & Embedded Linux Storage Forum
and it's the results of feedbacks from many people. We also checked with
fsdevl and f2fs mailing list developers that this change in the usage of
REQ_META is not affecting FS behavior and we got positive feedbacks.
Reporting here the feedbacks:
http://comments.gmane.org/gmane.linux.file-systems/97219
http://thread.gmane.org/gmane.linux.file-systems.f2fs/3178/focus=3183

Signed-off-by: Bruce Ford <bford@micron.com>
Signed-off-by: Luca Porzio <lporzio@micron.com>
Fixes: ce39f9d17c14 ("mmc: support packed write command for eMMC4.5 devices")
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
 drivers/mmc/card/block.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index 96d2f08a2516..76efef5af670 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -62,8 +62,7 @@ MODULE_ALIAS("mmc:block");
 #define MMC_SANITIZE_REQ_TIMEOUT 240000
 #define MMC_EXTRACT_INDEX_FROM_ARG(x) ((x & 0x00FF0000) >> 16)
 
-#define mmc_req_rel_wr(req)	(((req->cmd_flags & REQ_FUA) || \
-				  (req->cmd_flags & REQ_META)) && \
+#define mmc_req_rel_wr(req)	((req->cmd_flags & REQ_FUA) && \
 				  (rq_data_dir(req) == WRITE))
 #define PACKED_CMD_VER	0x01
 #define PACKED_CMD_WR	0x02
@@ -1372,13 +1371,9 @@ static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq,
 
 	/*
 	 * Reliable writes are used to implement Forced Unit Access and
-	 * REQ_META accesses, and are supported only on MMCs.
-	 *
-	 * XXX: this really needs a good explanation of why REQ_META
-	 * is treated special.
+	 * are supported only on MMCs.
 	 */
-	bool do_rel_wr = ((req->cmd_flags & REQ_FUA) ||
-			  (req->cmd_flags & REQ_META)) &&
+	bool do_rel_wr = (req->cmd_flags & REQ_FUA) &&
 		(rq_data_dir(req) == WRITE) &&
 		(md->flags & MMC_BLK_REL_WR);
 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[3.16.y-ckt stable] Linux 3.16.7-ckt22 stable review Luis Henriques <luis.henriques@canonical.com> - 2016-01-06 12:20 +0100
  [PATCH 3.16.y-ckt 009/126] USB: serial: option: add support for Novatel MiFi USB620L Luis Henriques <luis.henriques@canonical.com> - 2016-01-06 12:20 +0100
  [PATCH 3.16.y-ckt 015/126] usb: dwc3: gadget: let us set lower max_speed Luis Henriques <luis.henriques@canonical.com> - 2016-01-06 12:20 +0100
  [PATCH 3.16.y-ckt 007/126] drm/i915: quirk backlight present on Macbook 4, 1 Luis Henriques <luis.henriques@canonical.com> - 2016-01-06 12:20 +0100
  [PATCH 3.16.y-ckt 032/126] sctp: translate host order to network order when setting a hmacid Luis Henriques <luis.henriques@canonical.com> - 2016-01-06 12:20 +0100
  [PATCH 3.16.y-ckt 001/126] iio: lpc32xx_adc: fix warnings caused by enabling unprepared clock Luis Henriques <luis.henriques@canonical.com> - 2016-01-06 12:20 +0100
  [PATCH 3.16.y-ckt 038/126] unix: avoid use-after-free in ep_remove_wait_queue Luis Henriques <luis.henriques@canonical.com> - 2016-01-06 12:20 +0100
  [PATCH 3.16.y-ckt 034/126] usb: musb: core: fix order of arguments to ulpi write callback Luis Henriques <luis.henriques@canonical.com> - 2016-01-06 12:20 +0100
  [PATCH 3.16.y-ckt 027/126] mmc: remove bondage between REQ_META and reliable write Luis Henriques <luis.henriques@canonical.com> - 2016-01-06 12:20 +0100
  [PATCH 3.16.y-ckt 006/126] iio: adc: xilinx: Fix VREFN scale Luis Henriques <luis.henriques@canonical.com> - 2016-01-06 12:20 +0100
  [PATCH 3.16.y-ckt 035/126] FS-Cache: Add missing initialization of ret in cachefiles_write_page() Luis Henriques <luis.henriques@canonical.com> - 2016-01-06 12:20 +0100
  [PATCH 3.16.y-ckt 013/126] USB: qcserial: Fix support for HP lt4112 LTE/HSPA+ Gobi 4G Modem Luis Henriques <luis.henriques@canonical.com> - 2016-01-06 12:20 +0100
  [PATCH 3.16.y-ckt 004/126] iio:ad7793: Fix ad7785 product ID Luis Henriques <luis.henriques@canonical.com> - 2016-01-06 12:20 +0100
  [PATCH 3.16.y-ckt 023/126] fat: fix fake_offset handling on error path Luis Henriques <luis.henriques@canonical.com> - 2016-01-06 12:20 +0100
  [PATCH 3.16.y-ckt 019/126] x86/cpu: Fix SMAP check in PVOPS environments Luis Henriques <luis.henriques@canonical.com> - 2016-01-06 12:20 +0100
  [PATCH 3.16.y-ckt 003/126] iio: ad5064: Fix ad5629/ad5669 shift Luis Henriques <luis.henriques@canonical.com> - 2016-01-06 12:20 +0100
  [PATCH 3.16.y-ckt 010/126] USB: ti_usb_3410_5052: Add Honeywell HGI80 ID Luis Henriques <luis.henriques@canonical.com> - 2016-01-06 12:20 +0100
  [PATCH 3.16.y-ckt 016/126] usb: chipidea: debug: disable usb irq while role switch Luis Henriques <luis.henriques@canonical.com> - 2016-01-06 12:20 +0100
  [PATCH 3.16.y-ckt 029/126] packet: do skb_probe_transport_header when we actually have data Luis Henriques <luis.henriques@canonical.com> - 2016-01-06 12:20 +0100
  [PATCH 3.16.y-ckt 030/126] packet: only allow extra vlan len on ethernet devices Luis Henriques <luis.henriques@canonical.com> - 2016-01-06 12:20 +0100
  [PATCH 3.16.y-ckt 018/126] xhci: Fix a race in usb2 LPM resume, blocking U3 for usb2 devices Luis Henriques <luis.henriques@canonical.com> - 2016-01-06 12:20 +0100
  [PATCH 3.16.y-ckt 005/126] x86/fpu: Fix 32-bit signal frame handling Luis Henriques <luis.henriques@canonical.com> - 2016-01-06 12:20 +0100
  [PATCH 3.16.y-ckt 011/126] drm/i915: get runtime PM reference around GEM set_caching IOCTL Luis Henriques <luis.henriques@canonical.com> - 2016-01-06 12:20 +0100
  [PATCH 3.16.y-ckt 020/126] arm64: restore bogomips information in /proc/cpuinfo Luis Henriques <luis.henriques@canonical.com> - 2016-01-06 12:20 +0100
  [PATCH 3.16.y-ckt 002/126] iio:ad5064: Make sure ad5064_i2c_write() returns 0 on success Luis Henriques <luis.henriques@canonical.com> - 2016-01-06 12:30 +0100

csiph-web