All of lore.kernel.org
 help / color / mirror / Atom feed
From: Albert Cahalan <albert@users.sf.net>
To: Paulo Marques <pmarques@grupopie.com>
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: 08 Oct 2004 14:14:04 -0400	[thread overview]
Message-ID: <1097259244.2673.2646.camel@cube> (raw)
In-Reply-To: <4166C216.2080305@grupopie.com>

On Fri, 2004-10-08 at 12:36, Paulo Marques wrote:
> Russell King wrote:
> > On Mon, Sep 27, 2004 at 09:03:05PM +0100, Russell King wrote:
> > 
> >>The ARM binutils seems to be in a problematical state at the moment.
> >>It has recently had a "bug" fixed where ARM specific "mapping symbols"
> >>were not generated in ELF objects.  These "mapping symbols" have names
> >>such as "$a" and "$d".
> > 
> > 
> > Ok, another tool which is affected by this is procps:
> > 
> > $ ps alx
> > Warning: /boot/System.map-2.6.9-rc3 not parseable as a System.map
> > Warning: /boot/System.map not parseable as a System.map
> > Warning: /usr/src/linux/System.map has an incorrect kernel version.
> > F   UID   PID  PPID PRI  NI   VSZ  RSS WCHAN  STAT TTY        TIME COMMAND
> > 4     0     1     0  16   0  1244  508 do_sel S    ?          0:01 init [3]

The "$" is considered a garbage character by the sanity check.
(same as "\v", "\033", "\xff", and so on)

> ps is reading System.map probably because reading /proc/<pid>/wchan 
> directly was very slow. It used to take an average of 1.3ms (on a P4 
> 2.8GHz) and now it takes less than 0.5us (that is miliseconds and 
> microseconds!)

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

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



  reply	other threads:[~2004-10-08 18:24 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 [this message]
2004-10-08 19:43       ` Paulo Marques
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=1097259244.2673.2646.camel@cube \
    --to=albert@users.sf.net \
    --cc=Catalin.Marinas@arm.com \
    --cc=Richard.Earnshaw@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmarques@grupopie.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.