From: Ralf Baechle <ralf@linux-mips.org>
To: moreau francis <francis_moreau2000@yahoo.fr>
Cc: linux-mips@linux-mips.org
Subject: Re: module allocation
Date: Fri, 28 Apr 2006 21:03:07 +0100 [thread overview]
Message-ID: <20060428200307.GA17705@linux-mips.org> (raw)
In-Reply-To: <20060428130417.71285.qmail@web25813.mail.ukl.yahoo.com>
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 ?
>
> I can see only drawbacks:
>
> - It consumes TLB entries,
>
> - When accessing to the module's code, we use TLB entries which can
> be bad for interrupt latencies. For instance: if the module has an
> interrupt handler and the module's code in still not mapped in the
> TLB, we got a page fault...
Not quite. There will be a TLB reload exception but that it's. These
TLB entries are all marked global, dirty and valid so the overhead is
as big as in the best case for user pages.
> - Modules are usually loaded at startup, at this time the memory
> should not be fragmented.
Usually but not always and we need to guarantee that things are working
under all circumstances.
There is another reason against putting modules into mapped space and
that's the need for -mlong-calls which generates larger, less efficient
code.
One disadvantage of using GFP allocations would be that they're rounding up
the memory allocations to the next power of two, so a 40k module for
example would actually allocate 64k ...
Ralf
next prev parent reply other threads:[~2006-04-28 20:03 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-28 13:04 module allocation moreau francis
2006-04-28 20:03 ` Ralf Baechle [this message]
2006-05-02 7:19 ` Re : " moreau francis
2006-05-02 9:36 ` Ralf Baechle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060428200307.GA17705@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=francis_moreau2000@yahoo.fr \
--cc=linux-mips@linux-mips.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.