depmod: Increase locality of reference during table loading
authorAlan Jenkins <alan-jenkins@tuffmail.co.uk>
Mon, 13 Oct 2008 05:39:26 +0000 (01:39 -0400)
committerJon Masters <jcm@jonmasters.org>
Mon, 13 Oct 2008 05:39:26 +0000 (01:39 -0400)
commit8acbf726bd1b474daa1332487c4b779a786ddb8e
tree8e70bd4910e510dcb3842fcf8295dbf39adb7dd1
parentef92d7ac9b3e57d48ba29a8989eb4b1f1bd487ed
depmod: Increase locality of reference during table loading

Invert the table loading loop so it only scans through the module
data once.  We used to scan the module data once for each table,
which doesn't make best use of CPU cache.

This has a measurable effect on depmod CPU usage.

Signed-off-by: Jon Masters <jcm@jonmasters.org>
moduleops_core.c