From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Arseny Maslennikov <ar@cs.msu.ru>
Cc: Jiri Slaby <jslaby@suse.com>, Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
"Vladimir D. Seleznev" <vseleznv@altlinux.org>,
Rob Landley <rob@landley.net>,
"Eric W. Biederman" <ebiederm@xmission.com>,
Pavel Machek <pavel@ucw.cz>
Subject: Re: [PATCH v2 7/7] n_tty: Provide an informational line on VSTATUS receipt
Date: Tue, 30 Jul 2019 18:19:40 +0200 [thread overview]
Message-ID: <20190730161940.GA15798@kroah.com> (raw)
In-Reply-To: <20190625161153.29811-8-ar@cs.msu.ru>
On Tue, Jun 25, 2019 at 07:11:53PM +0300, Arseny Maslennikov wrote:
> If the three termios local flags isig, icanon, iexten are enabled
> and the local flag nokerninfo is disabled for a tty governed
> by the n_tty line discipline, then on receiving the keyboard status
> character n_tty will generate a status message and write it out to
> the tty before sending SIGINFO to the tty's foreground process group.
>
> This kerninfo line contains information about the current system load
> as well as some properties of "the most interesting" process in the
> tty's current foreground process group, namely:
> - its PID as seen inside its deepest PID namespace;
> * the whole process group ought to be in a single PID namespace,
> so this is actually deterministic
> - its saved command name truncated to 16 bytes (task_struct::comm);
> * at the time of writing TASK_COMM_LEN == 16
> - its state and some related bits, procps-style;
> - for S and D: its symbolic wait channel, if available; or a short
> description for other process states instead;
> - its user, system and real rusage time values;
> - its resident set size (as well as the high watermark) in kilobytes.
Why is this really all needed as we have the SysRq handlers that report
all of this today?
> The "most interesting" process is chosen as follows:
> - runnables over everything
> - uninterruptibles over everything else
> - among 2 runnables pick the biggest utime + stime
> - any unresolved ties are decided in favour of greatest PID.
This does not feel like something that the tty core code should be doing
at all.
> While the kerninfo line is not very useful for debugging the kernel
> itself, since we have much more powerful debugging tools, it still gives
> the user behind the terminal some meaningful feedback to a VSTATUS that
> works even if no processes respond.
That's what SysRq is for. If there's a specific set of values that we
don't currently report in that facility, why not just add the
information there? It's much simpler and "safer" that way.
thanks,
greg k-h
next prev parent reply other threads:[~2019-07-30 16:19 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-25 16:11 [PATCH v2 0/7] TTY Keyboard Status Request Arseny Maslennikov
2019-06-25 16:11 ` [PATCH v2 1/7] signal.h: Define SIGINFO on all architectures Arseny Maslennikov
2019-06-25 16:11 ` [PATCH v2 2/7] tty: termios: Reserve space for VSTATUS in .c_cc Arseny Maslennikov
2019-06-25 16:11 ` [PATCH v2 3/7] n_tty: Send SIGINFO to fg pgrp on status request character Arseny Maslennikov
2019-06-25 16:11 ` [PATCH v2 4/7] linux/signal.h: Ignore SIGINFO by default in new tasks Arseny Maslennikov
2019-06-25 21:32 ` Theodore Ts'o
2019-06-26 13:49 ` Arseny Maslennikov
2019-07-29 10:55 ` Arseny Maslennikov
2019-06-25 16:11 ` [PATCH v2 5/7] tty: Add NOKERNINFO lflag to termios Arseny Maslennikov
2019-06-25 16:11 ` [PATCH v2 6/7] n_tty: ->ops->write: Cut core logic out to a separate function Arseny Maslennikov
2019-06-25 16:11 ` [PATCH v2 7/7] n_tty: Provide an informational line on VSTATUS receipt Arseny Maslennikov
2019-07-30 16:19 ` Greg Kroah-Hartman [this message]
2019-07-31 22:23 ` Arseny Maslennikov
2019-08-01 9:20 ` Greg Kroah-Hartman
2019-08-01 10:10 ` Pavel Machek
2019-08-01 12:44 ` Rob Landley
2019-08-02 11:04 ` Arseny Maslennikov
2019-08-01 12:35 ` Rob Landley
2019-07-29 10:56 ` [PATCH v2 0/7] TTY Keyboard Status Request Arseny Maslennikov
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=20190730161940.GA15798@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=ar@cs.msu.ru \
--cc=ebiederm@xmission.com \
--cc=jslaby@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pavel@ucw.cz \
--cc=peterz@infradead.org \
--cc=rob@landley.net \
--cc=vseleznv@altlinux.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).