[Top] [All Lists]

Re : module allocation

To: Ralf Baechle <>
Subject: Re : module allocation
From: moreau francis <>
Date: Sat, 29 Apr 2006 11:41:01 +0200 (CEST)
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024;; h=Message-ID:Date:From:Reply-To:Subject:To:Cc:MIME-Version:Content-Type; b=jtGm1STmeudxbeHrdFce8+l3T/esLw8IXTF/N/yfHGJ7K4rpPJ5gqWUkmkIcKp1OM/1DodkoFUzbovcBezywirmRSJcTNnFQeA3NB8Rw3YOueeb6LVuFPzOQ/89zTQ2pgJPZJ2UM3Wlb3/s4nhipEgWKeeh8ZAXGLPIxE2YoXJA= ;
Original-recipient: rfc822;
Reply-to: moreau francis <>
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:

  - 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.

  - 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 ?


<Prev in Thread] Current Thread [Next in Thread>