[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87sijhwtcc.fsf@x220.int.ebiederm.org>
Date: Tue, 23 Sep 2014 21:11:31 -0700
From: ebiederm@...ssion.com (Eric W. Biederman)
To: Thomas Graf <tgraf@...g.ch>
Cc: Eric Dumazet <eric.dumazet@...il.com>, davem@...emloft.net,
paulmck@...ux.vnet.ibm.com, john.r.fastabend@...el.com,
kaber@...sh.net, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/5] rhashtable: Remove gfp_flags from insert and remove functions
Thomas Graf <tgraf@...g.ch> writes:
> On 09/15/14 at 05:35am, Eric Dumazet wrote:
>> On Mon, 2014-09-15 at 14:18 +0200, Thomas Graf wrote:
>> > As the expansion/shrinking is moved to a worker thread, no allocations
>> > will be performed anymore.
>> >
>>
>> You meant : no GFP_ATOMIC allocations ?
>>
>> I would rephrase using something like :
>>
>> Because hash resizes are potentially time consuming, they'll be
>> performed in process context where GFP_KERNEL allocations are preferred.
>
> I meant to say no allocations in insert/remove anymore but your wording
> is even clearer. I'll update it.
>
>> > - tbl = kzalloc(size, flags);
>> > + tbl = kzalloc(size, GFP_KERNEL);
>>
>> Add __GFP_NOWARN, as you fallback to vzalloc ?
>
> Good point.
It needs to be both __GFP_NOWARN and __GFP_NORETRY.
Otherwise the system will kick in the OOM killer before it falls back to
vzalloc. Which I can't imagine anyone wanting.
Look at the history of alloc_fdmem in fs/file.c for the real world
reasoning.
Eric
--
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