* Re: [14/14] vcompound: Avoid vmalloc for ehash_locks
[not found] ` <20080321061727.491610308@sgi.com>
@ 2008-03-21 7:02 ` Eric Dumazet
2008-03-21 7:03 ` Christoph Lameter
2008-03-21 7:31 ` David Miller
0 siblings, 2 replies; 6+ messages in thread
From: Eric Dumazet @ 2008-03-21 7:02 UTC (permalink / raw)
To: Christoph Lameter; +Cc: linux-mm, linux-kernel, Linux Netdev List
Christoph Lameter a écrit :
> Avoid the use of vmalloc for the ehash locks.
>
> Signed-off-by: Christoph Lameter <clameter@sgi.com>
>
> ---
> include/net/inet_hashtables.h | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> Index: linux-2.6.25-rc5-mm1/include/net/inet_hashtables.h
> ===================================================================
> --- linux-2.6.25-rc5-mm1.orig/include/net/inet_hashtables.h 2008-03-20 22:21:02.680501729 -0700
> +++ linux-2.6.25-rc5-mm1/include/net/inet_hashtables.h 2008-03-20 22:22:15.416565317 -0700
> @@ -164,7 +164,8 @@ static inline int inet_ehash_locks_alloc
> if (sizeof(rwlock_t) != 0) {
> #ifdef CONFIG_NUMA
> if (size * sizeof(rwlock_t) > PAGE_SIZE)
> - hashinfo->ehash_locks = vmalloc(size * sizeof(rwlock_t));
> + hashinfo->ehash_locks = __alloc_vcompound(GFP_KERNEL,
> + get_order(size * sizeof(rwlock_t)));
> else
> #endif
> hashinfo->ehash_locks = kmalloc(size * sizeof(rwlock_t),
> @@ -185,7 +186,7 @@ static inline void inet_ehash_locks_free
> unsigned int size = (hashinfo->ehash_locks_mask + 1) *
> sizeof(rwlock_t);
> if (size > PAGE_SIZE)
> - vfree(hashinfo->ehash_locks);
> + __free_vcompound(hashinfo->ehash_locks);
> else
> #endif
> kfree(hashinfo->ehash_locks);
>
But, isnt it defeating the purpose of this *particular* vmalloc() use ?
CONFIG_NUMA and vmalloc() at boot time means :
Try to distribute the pages on several nodes.
Memory pressure on ehash_locks[] is so high we definitly want to spread it.
(for similar uses of vmalloc(), see also hashdist=1 )
Also, please CC netdev for network patches :)
Thank you
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [14/14] vcompound: Avoid vmalloc for ehash_locks
2008-03-21 7:02 ` [14/14] vcompound: Avoid vmalloc for ehash_locks Eric Dumazet
@ 2008-03-21 7:03 ` Christoph Lameter
2008-03-21 7:31 ` David Miller
2008-03-21 7:31 ` David Miller
1 sibling, 1 reply; 6+ messages in thread
From: Christoph Lameter @ 2008-03-21 7:03 UTC (permalink / raw)
To: Eric Dumazet; +Cc: linux-mm, linux-kernel, Linux Netdev List
On Fri, 21 Mar 2008, Eric Dumazet wrote:
> But, isnt it defeating the purpose of this *particular* vmalloc() use ?
I thought that was controlled by hashdist? I did not see it used here and
so I assumed that the RR was not intended here.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [14/14] vcompound: Avoid vmalloc for ehash_locks
2008-03-21 7:02 ` [14/14] vcompound: Avoid vmalloc for ehash_locks Eric Dumazet
2008-03-21 7:03 ` Christoph Lameter
@ 2008-03-21 7:31 ` David Miller
2008-03-21 17:31 ` Christoph Lameter
1 sibling, 1 reply; 6+ messages in thread
From: David Miller @ 2008-03-21 7:31 UTC (permalink / raw)
To: dada1; +Cc: clameter, linux-mm, linux-kernel, netdev
From: Eric Dumazet <dada1@cosmosbay.com>
Date: Fri, 21 Mar 2008 08:02:11 +0100
> But, isnt it defeating the purpose of this *particular* vmalloc() use ?
>
> CONFIG_NUMA and vmalloc() at boot time means :
>
> Try to distribute the pages on several nodes.
>
> Memory pressure on ehash_locks[] is so high we definitly want to spread it.
>
> (for similar uses of vmalloc(), see also hashdist=1 )
>
> Also, please CC netdev for network patches :)
I agree with Eric, converting any of the networking hash
allocations to this new facility is not the right thing
to do.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [14/14] vcompound: Avoid vmalloc for ehash_locks
2008-03-21 7:03 ` Christoph Lameter
@ 2008-03-21 7:31 ` David Miller
2008-03-21 7:42 ` Eric Dumazet
0 siblings, 1 reply; 6+ messages in thread
From: David Miller @ 2008-03-21 7:31 UTC (permalink / raw)
To: clameter; +Cc: dada1, linux-mm, linux-kernel, netdev
From: Christoph Lameter <clameter@sgi.com>
Date: Fri, 21 Mar 2008 00:03:51 -0700 (PDT)
> On Fri, 21 Mar 2008, Eric Dumazet wrote:
>
> > But, isnt it defeating the purpose of this *particular* vmalloc() use ?
>
> I thought that was controlled by hashdist? I did not see it used here and
> so I assumed that the RR was not intended here.
It's intended for all of the major networking hash tables.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [14/14] vcompound: Avoid vmalloc for ehash_locks
2008-03-21 7:31 ` David Miller
@ 2008-03-21 7:42 ` Eric Dumazet
0 siblings, 0 replies; 6+ messages in thread
From: Eric Dumazet @ 2008-03-21 7:42 UTC (permalink / raw)
To: David Miller; +Cc: clameter, linux-mm, linux-kernel, netdev
David Miller a écrit :
> From: Christoph Lameter <clameter@sgi.com>
> Date: Fri, 21 Mar 2008 00:03:51 -0700 (PDT)
>
>> On Fri, 21 Mar 2008, Eric Dumazet wrote:
>>
>>> But, isnt it defeating the purpose of this *particular* vmalloc() use ?
>> I thought that was controlled by hashdist? I did not see it used here and
>> so I assumed that the RR was not intended here.
>
> It's intended for all of the major networking hash tables.
Other networking hash tables uses alloc_large_system_hash(), which handles
hashdist settings.
But this helper is __init only, so we can not use it for ehash_locks (can be
allocated by DCCP module)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [14/14] vcompound: Avoid vmalloc for ehash_locks
2008-03-21 7:31 ` David Miller
@ 2008-03-21 17:31 ` Christoph Lameter
0 siblings, 0 replies; 6+ messages in thread
From: Christoph Lameter @ 2008-03-21 17:31 UTC (permalink / raw)
To: David Miller; +Cc: dada1, linux-mm, linux-kernel, netdev
On Fri, 21 Mar 2008, David Miller wrote:
> I agree with Eric, converting any of the networking hash
> allocations to this new facility is not the right thing
> to do.
Ok. Going to drop it.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-03-21 17:33 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20080321061703.921169367@sgi.com>
[not found] ` <20080321061727.491610308@sgi.com>
2008-03-21 7:02 ` [14/14] vcompound: Avoid vmalloc for ehash_locks Eric Dumazet
2008-03-21 7:03 ` Christoph Lameter
2008-03-21 7:31 ` David Miller
2008-03-21 7:42 ` Eric Dumazet
2008-03-21 7:31 ` David Miller
2008-03-21 17:31 ` Christoph Lameter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox