From: David Brownell Subject: Re: [PATCH] jffs2 summary allocation Date: Fri, 4 Apr 2008 19:41:34 -0700 Message-ID: <200804041941.35075.david-b@pacbell.net> References: <713171.37644.qm@web26213.mail.ukl.yahoo.com> <9c9fda240804041829r5a768b39n340926485aa12687@mail.gmail.com> <20080404184615.deaf3122.akpm@linux-foundation.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Kyungmin Park , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, Michael Trimarchi , spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, Josh Boyer , dwmw2-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org, linux-arm-kernel-xIg/pKzrS19vn6HldHNs0ANdhmdF6hFW@public.gmane.org To: Andrew Morton Return-path: In-Reply-To: <20080404184615.deaf3122.akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org> Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: spi-devel-general-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: spi-devel-general-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: linux-spi.vger.kernel.org On Friday 04 April 2008, Andrew Morton wrote: > This problem comes up pretty often. Which problem -- kmalloc(BIG)? Or dma(dma-unsafe-mem)? Or something else? The specific issue here might best be described as JFFS2 making a bad assumption: that MTD drivers never use DMA. The I2C stack does that in some cases (for example, I/O buffers in i2c_smbus_xfer_emulated are on-stack), but I'd not call that an especially common assumption. > Rather than open-coding it yet again > it'd be nice to have a little bit of library code which manages an array of > pages and which has accessors for common operations like > read/write-u8/u16/u32/u64, memset, memcpy, etc. If array-of-pages is to be more widely adopted, that'd make sense. The MTD framework is a bit odd in that respect ... it has block devices but doesn't use the scatterlist primitives. - Dave ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Register now and save $200. Hurry, offer ends at 11:59 p.m., Monday, April 7! Use priority code J8TLD2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone