[PATCH] [RFC] UBI: Implement Fastmap support

Artem Bityutskiy dedekind1 at gmail.com
Thu May 24 04:22:00 EDT 2012


On Tue, 2012-05-22 at 18:55 +0200, Richard Weinberger wrote:
> >> +     * has never seen any PEB used by the original fastmap.
> >> +     */
> >> +    if (!e) {
> >> +            ubi_assert(ubi->old_fm);
> >> +            e = kmem_cache_alloc(ubi_wl_entry_slab, GFP_ATOMIC);
> >
> > Must it be GFP_ATOMIC?
> 
> Yes. This function is called under a spinlock.

I did not look close, but this sounds bad.

You need to have a much better justification than "I allocate it under a
spinlock". You need to tell "... because there is no way or very
difficult to pre-allocate it while I do not have the spinlock held,
because ... (explanation)".

> 
-- 
Best Regards,
Artem Bityutskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-mtd/attachments/20120524/765814d8/attachment-0001.sig>


More information about the linux-mtd mailing list