* Re : module allocation
@ 2006-04-29 9:41 moreau francis
2006-04-29 20:39 ` Ralf Baechle
0 siblings, 1 reply; 4+ messages in thread
From: moreau francis @ 2006-04-29 9:41 UTC (permalink / raw)
To: Ralf Baechle; +Cc: linux-mips
On Fri, Apr 28, 2006 at 01:04:17PM +0000, moreau francis wrote:
> Maybe a silly question...why do we use mapped memory (allocated by
> vmalloc) for inserting a module into the kernel ?
>
Ok, to sum up things:
Pros:
- allocation granularity is a page size where as GFP allocations is a power
of two...
- better chance for the module to get loaded into fragmented memory.
Cons:
- it consumes TLB entries, (usually one ?)
- it needs to generate the module with "-mlong-calls" switch which generates
larger and less efficient code.
- there will be a refill exception overhead each time the module code will be
executed and it's not mapped through TLB.
maybe that would make sense to do some benchmarks ?
Thanks
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Re : module allocation
2006-04-29 9:41 Re : module allocation moreau francis
@ 2006-04-29 20:39 ` Ralf Baechle
0 siblings, 0 replies; 4+ messages in thread
From: Ralf Baechle @ 2006-04-29 20:39 UTC (permalink / raw)
To: moreau francis; +Cc: linux-mips
On Sat, Apr 29, 2006 at 11:41:01AM +0200, moreau francis wrote:
> maybe that would make sense to do some benchmarks ?
It would be interesting to actually have some numbers, yes. I expect the
impact to be significantly less than of the PIC code used for userspace.
Ralf
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re : module allocation
2006-04-28 20:03 Ralf Baechle
@ 2006-05-02 7:19 ` moreau francis
2006-05-02 9:36 ` Ralf Baechle
0 siblings, 1 reply; 4+ messages in thread
From: moreau francis @ 2006-05-02 7:19 UTC (permalink / raw)
To: Ralf Baechle; +Cc: linux-mips
> There is another reason against putting modules into mapped space and
> that's the need for -mlong-calls which generates larger, less efficient
> code.
BTW, I don't see why -mlong-calls wouldn't be needed for GFP module
allocation. Can you explain ?
Thanks
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Re : module allocation
2006-05-02 7:19 ` Re : " moreau francis
@ 2006-05-02 9:36 ` Ralf Baechle
0 siblings, 0 replies; 4+ messages in thread
From: Ralf Baechle @ 2006-05-02 9:36 UTC (permalink / raw)
To: moreau francis; +Cc: linux-mips
On Tue, May 02, 2006 at 07:19:49AM +0000, moreau francis wrote:
> > There is another reason against putting modules into mapped space and
> > that's the need for -mlong-calls which generates larger, less efficient
> > code.
>
> BTW, I don't see why -mlong-calls wouldn't be needed for GFP module
> allocation. Can you explain ?
It assumes a low-memory system where the entire RAM resides within the
range of a J/JAL instructions.
Ralf
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-05-02 9:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-29 9:41 Re : module allocation moreau francis
2006-04-29 20:39 ` Ralf Baechle
-- strict thread matches above, loose matches on Subject: below --
2006-04-28 20:03 Ralf Baechle
2006-05-02 7:19 ` Re : " moreau francis
2006-05-02 9:36 ` Ralf Baechle
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.