lkml.org 
[lkml]   [2008]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Allocate module.ref array dynamically
Eric Dumazet a écrit :
> Takashi Iwai a écrit :
>> Hi,
>>
>> we found that the kernel module sizes and memory footprints
>> grow drastically when NR_CPUS is high. For example, with
>> NR_CPUS=4096, SUSE kernel packages weigh over 500MB (even w/o debug
>> info).
>>
>> A part of the reason is the fixed size array in struct module.
>> The patch below fixes the problem by allocating it dynamically.
>> With the patch, the size can go down to 20MB.
>>
>>
>> Any comments/suggestions appreciated.
>>
>
> Many attempts were done on this area on the past.

Forgot to include a link to previous attempt : http://lkml.org/lkml/2008/5/15/402

>
> Your patch has the drawback of using kcalloc(), while previously,
> module_ref
> space was allocated with vmalloc().
>
> After a while, a machine could have a lot of vmalloc() space available,
> but not enough
> physically contiguous space to fullfill a kmalloc(large_area) call.
>
> So a module load could fail, while previous code could load module.
>
> I believe Mike Travis has a better patch for this problem, partly using
> new percpu allocator.
>


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2008-11-11 23:19    [W:0.330 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site