[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1249796132.9157.52.camel@localhost>
Date: Sun, 09 Aug 2009 08:35:32 +0300
From: Artem Bityutskiy <dedekind1@...il.com>
To: JiSheng Zhang <jszhang3@...il.com>
Cc: Adrian Hunter <adrian.hunter@...ia.com>,
"linux-mtd@...ts.infradead.org" <linux-mtd@...ts.infradead.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"dwmw2@...radead.org" <dwmw2@...radead.org>,
"rmk@....linux.org.uk" <rmk@....linux.org.uk>,
"Bityutskiy Artem (Nokia-D/Helsinki)" <Artem.Bityutskiy@...ia.com>
Subject: Re: [UBI UBIFS] replace vmalloc with kmalloc
On Fri, 2009-08-07 at 23:28 +0800, JiSheng Zhang wrote:
> Adrian Hunter <adrian.hunter@...ia.com> wrote:
> >
> > vmalloc allows large (> 128KiB) buffers, but kmalloc doesn't.
> > So we presently have no choice but to use vmalloc.
>
> But vmalloced buffer can't be easily passed to DMA, is there better choice?
We use vmalloc-ed buffers is when we need to do something with whole
eraseblocks, which may be 128KiB, or even 256KiB. So in general, we
cannot just s/kmalloc/vmalloc/. We should invent something trickier.
You should probably think about some generic way to solve problems like
this. May be some MTD-specific library could be created. You could
implement something like the flexible arrays, but with DMA stuff in mind
(e.g., adding a parameter which specifies allocation order, because for
DMA you may want to allocate more than one physically contiguous page).
Or you may even improve the existing flexible arrays to suit your needs.
Take a look here:
http://lwn.net/Articles/345273/
--
Best Regards,
Artem Bityutskiy (Артём Битюцкий)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists