Re: [PATCH] Add kallsyms_lookup() result cache

From: Andrew Morton
Date: Sat Jun 19 2004 - 05:10:02 EST


Albert Cahalan <albert@xxxxxxxxxxxxxxxxxxxxx> wrote:
>
> > Doing the cache in the kernel is the wrong place. This should be fixed
> > in user space.
>
> No way, because:
>
> 1. kernel modules may be loaded or unloaded at any time

Poll /proc/modules?

> 2. the /proc/*/wchan files don't provide both name and address

/proc/stat has the address, /proc/kallsyms gives the symbol?

> I'd be happy to make top (and the rest of procps) use a cache
> if those problems were addressed. I need a signal sent on
> module load/unload, or a real /proc/kallsyms st_mtime that I
> can poll. I also need to have the numeric wchan address in
> the /proc/*/wchan file, such that it is reliably the same
> thing as the function name already found there.

Updating mtime on /proc/modules may be more logical, or even both.

Or put a modprobe sequence number somewhere in /proc and look for changes
in that.

It definitely needs to be fixed, but it doesn't seem that adding code to
the kernel is needed.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/