From patchwork Mon Aug 26 10:14:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Miquel Raynal X-Patchwork-Id: 1976762 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=tEY1jl1P; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=gm1 header.b=mKLP1jLS; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=patchwork.ozlabs.org) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WsmmZ3StPz1yfF for ; Mon, 26 Aug 2024 20:16:30 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=yn/h9rUSGjx0HnZ7XD6qfj/OyPtI/hJVO78PUgKsmsI=; b=tEY1jl1PbIE0Kc fk8TaAmXq6P1EenIQ2p2wh741JzTE8KpTbe9puhvA1pQDsqcX5MJdiZ2PD+jujA/3wtUsNQESU9oO BkvgHiFOlBM64LGSFp2tX3OyUqudrtD1FgNawsAuoQhybhuZYtmdhGkjsbNHmK5GQQozX+lPPb2wy HsNR9OG9juNwLU04en26ZfLYPYAfzA6Y8eUx/M8Fq/VhI7IG1n3GVtGl/ULUFhx6HjhdVv74iapoF bhid/qGJJCjlIkPvsUzXPA7HbGosrnZDkVPhul6lH2VWBiPi2hHKMo89+4UeX2rtUs10veiLM+uya GVh0etA6ayduztko3uVA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1siWln-00000006t1W-3TAV; Mon, 26 Aug 2024 10:16:19 +0000 Received: from relay8-d.mail.gandi.net ([2001:4b98:dc4:8::228]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1siWjp-00000006sJR-0nqs for linux-mtd@lists.infradead.org; Mon, 26 Aug 2024 10:14:19 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id CE0FC1BF204; Mon, 26 Aug 2024 10:14:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1724667255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hrRodTOLiCRGoBbOUH+ZC/zB2XKXh+KXE5qYqsiVzvo=; b=mKLP1jLSuUKGoU5dNUHJkhaK4K6FZq6amAGu7iYdlCTpZcCsz/L0f59lX4VTjMa6lAaxOr 42xV0sja6WKqt8r8O0yoKgZxyzcXSO63mOy2AH3UWQKxGxlPB+xwHEJB45EFu7aRvKmap4 Yj7FEMI/MPyzRASTDIkOR0PrPEP1HfSkloZEcFdf3SrUpIcDaTuxV9BkWEEwYBf2y53ou8 KBdcGVsAiewgcQmmKeZrpLbORYpp48CXSdaq1dal5Eo2INn8QPFdl7YEcVcz2J15RE7/5a PvnpP+nhFoskhP5ON+r45ny1svbHkfh8l78XJL5+3gPvOX7ePuAmlQHoKrJ3ZA== From: Miquel Raynal To: Richard Weinberger , Vignesh Raghavendra , Tudor Ambarus , Pratyush Yadav , Michael Walle , Cc: Julien Su , Alvin Zhou , Thomas Petazzoni , Miquel Raynal Subject: [PATCH v2 0/9] mtd: spi-nand: Continuous read support Date: Mon, 26 Aug 2024 12:14:03 +0200 Message-ID: <20240826101412.20644-1-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-GND-Sasl: miquel.raynal@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240826_031417_406412_67B8243C X-CRM114-Status: GOOD ( 10.81 ) X-Spam-Score: -2.8 (--) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hello, After the raw NAND series, here is an equivalent series bringing continuous/sequential read support to spi-nand. The goal is to optimize the reads when several consecutive pages are read. More explana [...] Content analysis details: (-2.8 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [2001:4b98:dc4:8:0:0:0:228 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 T_SCC_BODY_TEXT_LINE No description available. X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Hello, After the raw NAND series, here is an equivalent series bringing continuous/sequential read support to spi-nand. The goal is to optimize the reads when several consecutive pages are read. More explanations about the "physics" in the patch 4 adding continuous read to the core. The feature stops at the block boundary for two reasons: * some vendors did not implement more * NANDs are accessed through UBI these days, and there is absolutely no guarantee (quite the opposite) two consecutive LEBs will end-up into two consecutive PEBs. The feature was tested using Macronix NANDs, and thus the vendor driver is updated to expose this new feature. Benchmarks are available in the last commit, but the overall the speed gains are impressive: up to 45% when reading a block in 1-1-4 mode, where a substantial time is lost waiting for the chip to be ready. Modified userspace tools are also available for testing: * https://lore.kernel.org/linux-mtd/20240826094629.19065-1-miquel.raynal@bootlin.com/T/#t * https://github.com/miquelraynal/mtd-utils branch: cont-read Cheers, Miquèl Changes in v2: * A Reviewed-by from Pratyush. * Dropped the static key optimization and turned the logic per-chip instead of global. Miquel Raynal (9): mtd: nand: Rename the NAND IO iteration helper mtd: nand: Introduce a block iterator mtd: spi-nand: Isolate the MTD read logic in a helper mtd: spi-nand: Add continuous read support mtd: spi-nand: Expose spinand_write_reg_op() mtd: spi-nand: macronix: Fix helper name mtd: spi-nand: macronix: Extract the bitflip retrieval logic mtd: spi-nand: macronix: Add a possible bitflip status flag mtd: spi-nand: macronix: Continuous read support drivers/mtd/nand/spi/core.c | 216 ++++++++++++++++++++++++++++---- drivers/mtd/nand/spi/macronix.c | 122 +++++++++++++----- include/linux/mtd/nand.h | 90 +++++++++++-- include/linux/mtd/spinand.h | 17 +++ 4 files changed, 385 insertions(+), 60 deletions(-)