]> git.ipfire.org Git - thirdparty/kmod.git/commit
depmod: cache info_list in struct mod
authorLucas De Marchi <lucas.de.marchi@gmail.com>
Tue, 30 Oct 2012 05:16:10 +0000 (03:16 -0200)
committerLucas De Marchi <lucas.de.marchi@gmail.com>
Tue, 30 Oct 2012 05:24:25 +0000 (03:24 -0200)
commit7062eca38b02af4e80c8409e6296678f07e9937c
treeb352b53a21d13bdd9912e961b53d72f8977331b9
parentb51ac407c2320cea4c588ee0bf10332a340a027a
depmod: cache info_list in struct mod

The overall goal is to coalesce the accesses to a file that is the
backend of a module. This commit addresses the calls to
kmod_module_get_info(). Calling it earlier, while we are iterating the
modules allows us to free the struct kmod of each module much sooner. We
are still not freeing it since there are other places that must be
refactored first.

A nice side effect is that this commit reduces in ~33% the calls to
malloc(), giving a speedup of ~6% for cold caches (reproduced on only 1
laptop).
tools/depmod.c