tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: modules: per-segment policy



Le 08/06/2016 à 08:57, Martin Husemann a écrit :
On Wed, Jun 08, 2016 at 05:57:47AM +0800, Paul Goyette wrote:
All of this sounds like a good idea.  however, there are at least one or
two PRs out there related to limits on the amount of address space that
modules can occupy, on i386.

Where?

It would seem to me that taking each
module and mapping it in multipple page-sized pieces would end up taking
more total space (due to page-rounding) and possibly exacerbate the
current situation.

With three different chunks, we lose at most 12285 bytes in padding. No one
cares about losing such a ridiculously small amount of memory. There are
many places in the kernel that could be optimized to save up much more
space.


How about creating a vmmap for module_text and another for module_data,
 guessing the size split (upfront, statically) from statisitics in
/stand/modules ?


You are not going to guess it properly. A driver could have a lot of firmware
code in data and only few instructions; a syscall could have a lot of
instructions and no data at all. I don't think this even reduces memory usage,
since you also need to allocate memory for the map headers and other things.


Home | Main Index | Thread Index | Old Index