public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Albert Cahalan <albert@users.sf.net>
To: Andrew Morton OSDL <akpm@osdl.org>
Cc: Albert Cahalan <albert@users.sourceforge.net>,
	linux-kernel mailing list <linux-kernel@vger.kernel.org>,
	ak@suse.de, bcasavan@sgi.com
Subject: Re: [PATCH] Add kallsyms_lookup() result cache
Date: 19 Jun 2004 09:05:16 -0400	[thread overview]
Message-ID: <1087650315.8188.915.camel@cube> (raw)
In-Reply-To: <20040619030637.5580b25e.akpm@osdl.org>

On Sat, 2004-06-19 at 06:06, Andrew Morton wrote:
> Albert Cahalan <albert@users.sourceforge.net> 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?

Ugh. I like the sequence number suggestion better.
This is about speeding things up after all.

A signal that I could register to get would be best of all.

>>  2. the /proc/*/wchan files don't provide both name and address
>
> /proc/stat has the address, /proc/kallsyms gives the symbol?

Eh, why did we add the /proc/*/wchan files then if not
to use them?

One problem with parsing /proc/kallsyms is that I can't mmap
it and do a binary search. (the System.map was done this way)
It looks like I'd have to read half a megabyte of text, then
sort it for later use. It's highly desirable that the procps
tools not eat lots of memory or suffer high start-up costs.

>>  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.

I'm not so sure anything needs to be fixed, save for SGI upgrading
to a more modern procps. There are many more important things:

Supply a real SUSv3-compliant %CPU
Supply whole-process CPU usage data
Add a /proc/*/tty symlink
Allocated PIDs by least-recently-used for safety
Add an "adopted child" flag (for processes reparented to init)
Supply the sleep time (in seconds for example)
Supply jobc, the "count of processes qualifying PGID for job control"
Supply the raw task_struct and the needed debug info




  reply	other threads:[~2004-06-19 15:27 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-19  0:43 [PATCH] Add kallsyms_lookup() result cache Albert Cahalan
2004-06-19  4:51 ` Herbert Xu
2004-06-19 12:03   ` Albert Cahalan
2004-06-19 10:06 ` Andrew Morton
2004-06-19 13:05   ` Albert Cahalan [this message]
2004-06-22 19:45     ` Brent Casavant
2004-06-22 20:10       ` Jesse Barnes
  -- strict thread matches above, loose matches on Subject: below --
2004-06-18 20:03 Brent Casavant
2004-06-18 20:37 ` Martin Josefsson
2004-06-18 20:55   ` Brent Casavant
2004-06-18 22:03 ` Andi Kleen
2004-06-18 23:26   ` Jesse Barnes
2004-06-18 23:56     ` Andi Kleen
2004-06-19  0:16       ` Jesse Barnes
2004-06-18 23:31   ` Brent Casavant
2004-06-18 23:59     ` Andi Kleen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1087650315.8188.915.camel@cube \
    --to=albert@users.sf.net \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=albert@users.sourceforge.net \
    --cc=bcasavan@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox