[arch-dev-public] Module blacklisting
Dan McGee
dpmcgee at gmail.com
Tue Feb 26 12:54:34 EST 2008
On Tue, Feb 26, 2008 at 11:30 AM, Aaron Griffin <aaronmgriffin at gmail.com> wrote:
>
> On Tue, Feb 26, 2008 at 11:15 AM, Daniel Isenmann
> <daniel.isenmann at gmx.de> wrote:
> > I'm a little bit confused right now. How can I blacklist modules. I
> > have test both, MOD_BLACKLIST=(...) and MODULES=(!...), but both don't
> > work. udev loads every module which can be loaded. For example I
> > blacklist nvidiafb, but udev loads it. Packages are up2date with
> > testing repo.
> >
> > Can someone please explain it or the status is on this topic?
>
> The status is that I haven't gotten a concise answer. On this. For the
> time being, I think we should do the following:
>
> a) Rebuild udev 118 with start_udev in there, for the people who keep
> their systems in some goofy limbo state by only updating singular
> packages at a time
And add a big old echo at the top saying "You are using start_dev.
This script will be removed in a future release!"
> b) Switch to the udev 116 way of module loading
For now, yes. We know it works, and we can do some more investigation into this.
> c) Remove framebuffer module loading from the load-modules script (it
> should never have been there in the first place).
Agreed. What are the hotpoints in this script as well? Something like
this seems inefficient:
i="$(/sbin/modprobe -i --show-depends $1 | sed "s#^insmod
/lib.*/\(.*\)\.ko.*#\1#g" | sed 's|-|_|g')"
We invoke 3 subprocesses here (modprobe, sed, and sed). Surely the two
seds can be combined.
k="$(echo $BLACKLIST ${MOD_BLACKLIST[@]} | sed 's|-|_|g')"
j="$(echo ${MODULES[@]} | sed 's|-|_|g')"
Hmm, two more seds.
# add disablemodules= from commandline to blacklist
k="${k} $(echo ${disablemodules} | sed 's|-|_|g' | sed 's|,| |g')"
See a trend here? So we have the following in one run of
load-modules.sh (if we look back at the version packaged with 116):
cat: 1 invocation
eval: invocation count depends on results of cat
sed: 6 calls, probably not cheap
echo: 5+ calls, but probably a shell builtin
grep: 1 call
This all means we spawn *at least* 8 processes per module passed to
load-modules.sh. I can help clean this up and test if anyone else is
willing to help.
-Dan
More information about the arch-dev-public
mailing list