linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paulo Marques <pmarques@grupopie.com>
To: Albert Cahalan <albert@users.sf.net>
Cc: Russell King <rmk+lkml@arm.linux.org.uk>,
	Linux Kernel List <linux-kernel@vger.kernel.org>,
	Rusty Russell <rusty@rustcorp.com.au>,
	Catalin Marinas <Catalin.Marinas@arm.com>,
	Richard Earnshaw <Richard.Earnshaw@arm.com>,
	Sam Ravnborg <sam@ravnborg.org>
Subject: Re: [RFC] ARM binutils feature churn causing kernel problems
Date: Fri, 08 Oct 2004 20:43:05 +0100	[thread overview]
Message-ID: <4166EDC9.7@grupopie.com> (raw)
In-Reply-To: <1097259244.2673.2646.camel@cube>

Albert Cahalan wrote:
> ....
> 
> No, the /proc/*/wchan file is supposed to be used.
> For some reason, stat() is failing. Here is the code:
> 
>   // next try the Linux 2.5.xx method
>   if(!stat("/proc/self/wchan", &sbuf)){
>     use_wchan_file = 1; // hack
>     return 0;
>   }
> 
> See what these commands tell you:
> 
> strace -o data -e trace=stat ps alx >> /dev/null ; grep self data
> stat /proc/self/wchan
> stat /proc/$$/wchan
> stat /proc/self/
> stat /proc/self

You are right. I just tested this on my system and ps doesn't read any 
System.map at all, provided there is a /proc/<pid>/wchan file to read from.

>>If this is the case, then after the changes to kallsyms go in, procps 
>>could start using wchan directly and avoid reading the System.map 
>>altogether.
> 
> 
> Here's an idea: if both name and number were provided
> at the same time and I could get notified when a module
> is loaded or unloaded, then I could cache the
> number-to-name translation.

This is more a question of whether kallsyms is a good feature to have 
always (modulo embedded or very limited memory systems) or not. If 
kallsyms is always available, the procps tools already read 
/proc/<pid>/wchan and don't need to cache anything at all. The only 
reason to cache would be performance, but if you try a recent -mm kernel 
you can see that there is no need for that any more.

 From what I've seen on this list since I've joined (almost a year ago), 
2.4 stack dumps are almost useless[1] whereas the 2.6 ones give very 
useful information thanks to the function names (and offsets) that lead 
to the problem.

IMHO we should try to make kallsyms always available, reducing further 
the space used by the symbol data if necessary.

-- 
Paulo Marques - www.grupopie.com

To err is human, but to really foul things up requires a computer.
Farmers' Almanac, 1978

[1] of course using ksymoops would solve this, but it requires more 
knowledge from the user than kallsyms, so it is not the same thing

  reply	other threads:[~2004-10-08 19:43 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-27 20:03 [RFC] ARM binutils feature churn causing kernel problems Russell King
2004-09-27 20:17 ` Christoph Hellwig
2004-09-27 20:35   ` Russell King
2004-09-27 20:37   ` Nicolas Pitre
2004-10-01 20:11 ` Russell King
2004-10-04 12:01   ` Catalin Marinas
2004-10-04 23:18     ` Rusty Russell
2004-10-05 11:10       ` Richard Earnshaw
2004-10-05 11:53         ` Russell King
2004-10-05 12:57           ` Richard Earnshaw
2004-10-05 13:14             ` Russell King
2004-10-05 13:40               ` Richard Earnshaw
2004-10-05 13:51                 ` Russell King
2004-10-06 10:08                   ` Adrian Cox
2004-10-07 15:02                     ` Russell King
2004-10-12 13:15                     ` Richard Earnshaw
2004-10-07 14:54                   ` Russell King
2004-10-05 23:00               ` Rusty Russell
2004-10-07 12:35                 ` Paulo Marques
2004-10-07 15:01                   ` Russell King
2004-10-07 16:39                     ` Paulo Marques
2004-10-05 13:02           ` Richard Earnshaw
2004-10-08 15:04 ` Russell King
2004-10-08 16:36   ` Paulo Marques
2004-10-08 18:14     ` Albert Cahalan
2004-10-08 19:43       ` Paulo Marques [this message]
2004-10-20 11:38 ` [PATCH] Fix ARM kernel build with permitted binutils versions Russell King
2004-10-26 22:37   ` Sam Ravnborg

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=4166EDC9.7@grupopie.com \
    --to=pmarques@grupopie.com \
    --cc=Catalin.Marinas@arm.com \
    --cc=Richard.Earnshaw@arm.com \
    --cc=albert@users.sf.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk+lkml@arm.linux.org.uk \
    --cc=rusty@rustcorp.com.au \
    --cc=sam@ravnborg.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;
as well as URLs for NNTP newsgroup(s).