From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgw-ext13.nokia.com ([131.228.20.172]) by canuck.infradead.org with esmtps (Exim 4.62 #1 (Red Hat Linux)) id 1GnahL-0000A0-G3 for linux-mtd@lists.infradead.org; Fri, 24 Nov 2006 08:02:44 -0500 Subject: Re: [PATCH] [MTD] NAND: Lazily BBT construction From: Artem Bityutskiy To: Konstantin Baydarov In-Reply-To: <20061124154210.6303c9fe@localhost.localdomain> References: <20061124154210.6303c9fe@localhost.localdomain> Content-Type: text/plain; charset=utf-8 Date: Fri, 24 Nov 2006 15:01:39 +0200 Message-Id: <1164373299.576.11.camel@sauron> Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Cc: linux-mtd@lists.infradead.org Reply-To: dedekind@infradead.org List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Fri, 2006-11-24 at 15:42 +0300, Konstantin Baydarov wrote: > This is the implementation of lazy BBT construction. It introduces > a new config option that allows to construct BBT(bad block table) > lazily for NAND chips with memory based BBT. > The main goal of the feature introduced is to decrease boot time. > How it works: BBT is filled only when we check if block is bad. NAND > is > scanned and BBT entries is constructed from topmost unscanned block to > requested. > By default BBT is constructed during boot. To enable lazily > construction NAND_LAZY_BBT bit should be set in options field of > structure nand_chip.=20 The idea looks nice. But I still have 2 questions. 1. Why don't you instead spawn a scanning kernel thread and do not build BBT in background. After the flash is scanned you just kill the thread. Also you block any task which accesses an unscanned eraseblock till the scanning thread scanned this eraseblock. 2. nand_base.c looks quite complex now. I wonder if it makes sense to do lazy BBT building always, I mean not to introduce this option but make it the only and default way? Well, it may make boot time a bit longer in case of small flashes, but I am not sure we should care. --=20 Best regards, Artem Bityutskiy (=D0=91=D0=B8=D1=82=D1=8E=D1=86=D0=BA=D0=B8=D0=B9 =D0=90= =D1=80=D1=82=D1=91=D0=BC)