[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4FBDF03F.8050006@nod.at>
Date: Thu, 24 May 2012 10:24:31 +0200
From: Richard Weinberger <richard@....at>
To: dedekind1@...il.com
CC: Shmulik Ladkani <shmulik.ladkani@...il.com>,
linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org,
Heinz.Egger@...utronix.de, tim.bird@...sony.com, tglx@...utronix.de
Subject: Re: [PATCH] [RFC] UBI: Implement Fastmap support
On 24.05.2012 10:22, Artem Bityutskiy wrote:
> 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)".
>
True, in v7 I've reworked ubi_wl_put_fm_peb(). Now it does no longer
need GFP_ATOMIC.
Thanks,
//richard
--
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