Messages in this thread | | | From | Roland Dreier <> | Subject | Re: [PATCH v5] RO/NX protection for loadable kernel modules | Date | Mon, 13 Jul 2009 09:59:04 -0700 |
| |
> > (I like the idea of trying kmalloc and falling back, simply because it reduces > > TLB pressure, > > I implemented this for 32bit in 2.4, but I always had second thoughts > if that was really reducing TLB pressure.
Certainly for non-x86 it can be very worthwhile. A long time ago I worked on an embedded product that used PowerPC 440, which has only 64 (software-loaded) TLB entries. On PPC 440, Linux has a pinned TLB entry for the kernel mapping, and modifying how the module loader allocated space to load modules into that mapping vs. one that had dynamic TLB entries was worth a factor of 2 in performance -- ie the TLB miss handling for .text was literally taking half the CPU time of the module code!
- R.
| |