public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@uni-koblenz.de>
To: Jean Wolter <jean.wolter@inf.tu-dresden.de>
Cc: Richard Henderson <rth@twiddle.net>,
	Alexander Viro <viro@math.psu.edu>,
	Linus Torvalds <torvalds@transmeta.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] show_task() and thread_saved_pc() fix for x86
Date: Wed, 15 Nov 2000 10:38:15 +0100	[thread overview]
Message-ID: <20001115103815.K927@bacchus.dhis.org> (raw)
In-Reply-To: <Pine.LNX.4.10.10011111844080.3611-100000@penguin.transmeta.com> <Pine.GSO.4.21.0011112207230.24250-100000@weyl.math.psu.edu> <20001113175017.B1820@twiddle.net> <86bsvizza3.fsf@kurt.inf.tu-dresden.de>
In-Reply-To: <86bsvizza3.fsf@kurt.inf.tu-dresden.de>; from jean.wolter@inf.tu-dresden.de on Tue, Nov 14, 2000 at 10:19:32AM +0100

On Tue, Nov 14, 2000 at 10:19:32AM +0100, Jean Wolter wrote:

> > > OTOH, the value is used only by Alt-SysRq-T, so... Hell knows.
> > 
> > No, it's also used by 'ps -l'.  See wchan.
> 
> ps -l uses get_wchan() (an architecture specific function from
> arch/*/kernel/process.c) to get the return address from
> schedule(). And now thread_saved_pc() seems to do the same (at least
> on x86). Is there any reason to have two architecture specific
> functions doing the same or do I miss something?
> 
> Jean
> 
> PS: Architectures other then x86 use thread_saved_pc() to implement
> get_wchan(). If the debug output of Alt-SysRq-T is supposed to show
> the waiting channel we should use get_wchan() instead of thread_saved_pc().

Probably historic reasons, it's been that way as long as I can think back.
Yet the use of thread_saved_pc() in kernel/sched.c should imho be considered
a buglet and be replaced by get_wchan to get more meaningful debugging
information.

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

      reply	other threads:[~2000-11-16  0:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-10 21:26 [PATCH] show_task() and thread_saved_pc() fix for x86 Alexander Viro
2000-11-11 13:06 ` Ralf Baechle
2000-11-12 10:04   ` Richard Henderson
2000-11-12  2:47 ` Linus Torvalds
2000-11-12  3:18   ` Alexander Viro
2000-11-12  3:23     ` Alexander Viro
2000-11-14  1:50     ` Richard Henderson
2000-11-14  9:19       ` Jean Wolter
2000-11-15  9:38         ` Ralf Baechle [this message]

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=20001115103815.K927@bacchus.dhis.org \
    --to=ralf@uni-koblenz.de \
    --cc=jean.wolter@inf.tu-dresden.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rth@twiddle.net \
    --cc=torvalds@transmeta.com \
    --cc=viro@math.psu.edu \
    /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