From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Walt Drummond <walt@drummond.us>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
Jiri Slaby <jirislaby@kernel.org>, Arnd Bergmann <arnd@arndb.de>,
Peter Zijlstra <peterz@infradead.org>,
Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
Daniel Bristot de Oliveira <bristot@redhat.com>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-arch@vger.kernel.org
Subject: Re: [RFC PATCH 8/8] signals: Support BSD VSTATUS, KERNINFO and SIGINFO
Date: Tue, 4 Jan 2022 08:27:06 +0100 [thread overview]
Message-ID: <YdP2yvYfmMp3QKKi@kroah.com> (raw)
In-Reply-To: <20220103181956.983342-9-walt@drummond.us>
On Mon, Jan 03, 2022 at 10:19:56AM -0800, Walt Drummond wrote:
> Support TTY VSTATUS character, NOKERNINFO local control bit and the
> signal SIGINFO, all as in 4.3BSD.
I am sorry, but this changelog text does not make any sense to me at
all. It needs to be much more detailed and explain why you are doing
this and what exactly it is doing as I have no idea.
Also, you seem to be adding new user/kernel apis here with no
documentation that I can see, nor any tests. So how is anyone supposed
to use this?
And finally:
> --- /dev/null
> +++ b/drivers/tty/tty_status.c
> @@ -0,0 +1,135 @@
> +// SPDX-License-Identifier: GPL-1.0+
Please no, you know better than that, and the checkpatch tool should
have warned you.
> +/*
> + * tty_status.c --- implements VSTATUS and TIOCSTAT from BSD4.3/4.4
> + *
> + */
> +
> +#include <linux/sched.h>
> +#include <linux/mm.h>
> +#include <linux/tty.h>
> +#include <linux/sched/cputime.h>
> +#include <linux/sched/loadavg.h>
> +#include <linux/pid.h>
> +#include <linux/slab.h>
> +#include <linux/math64.h>
> +
> +#define MSGLEN (160 + TASK_COMM_LEN)
> +
> +inline unsigned long getRSSk(struct mm_struct *mm)
> +{
> + if (mm == NULL)
> + return 0;
> + return get_mm_rss(mm) * PAGE_SIZE / 1024;
> +}
> +
> +inline long nstoms(long l)
> +{
> + l /= NSEC_PER_MSEC * 10;
> + if (l < 10)
> + l *= 10;
> + return l;
> +}
> +
> +inline struct task_struct *compare(struct task_struct *new,
> + struct task_struct *old)
> +{
> + unsigned int ostate, nstate;
> +
> + if (old == NULL)
> + return new;
> +
> + ostate = task_state_index(old);
> + nstate = task_state_index(new);
> +
> + if (ostate == nstate) {
> + if (old->start_time > new->start_time)
> + return old;
> + return new;
> + }
> +
> + if (ostate < nstate)
> + return old;
> +
> + return new;
> +}
> +
> +struct task_struct *pick_process(struct pid *pgrp)
Also, always run sparse on your changes, you have loads of new global
functions for no reason.
thanks,
greg k-h
next prev parent reply other threads:[~2022-01-04 7:27 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-03 18:19 [RFC PATCH 0/8] signals: Support more than 64 signals Walt Drummond
2022-01-03 18:19 ` [RFC PATCH 1/8] signals: Make the real-time signal system calls accept different sized sigset_t from user space Walt Drummond
2022-01-03 18:19 ` [RFC PATCH 2/8] signals: Put the full signal mask on the signal stack for x86_64, X32 and ia32 compatibility mode Walt Drummond
2022-01-03 18:19 ` [RFC PATCH 3/8] signals: Use a helper function to test if a signal is a real-time signal Walt Drummond
2022-01-03 18:19 ` [RFC PATCH 4/8] signals: Remove sigmask() macro Walt Drummond
2022-01-03 18:19 ` [RFC PATCH 5/8] signals: Better support cases where _NSIG_WORDS is greater than 2 Walt Drummond
2022-01-03 18:19 ` [RFC PATCH 6/8] signals: Round up _NSIG_WORDS Walt Drummond
2022-01-03 18:19 ` [RFC PATCH 7/8] signals: Add signal debugging Walt Drummond
2022-01-03 18:19 ` [RFC PATCH 8/8] signals: Support BSD VSTATUS, KERNINFO and SIGINFO Walt Drummond
2022-01-04 7:27 ` Greg Kroah-Hartman [this message]
2022-01-07 21:48 ` Arseny Maslennikov
2022-01-07 21:52 ` Walt Drummond
2022-01-07 22:39 ` Arseny Maslennikov
2022-01-08 14:38 ` Arseny Maslennikov
2022-01-03 18:48 ` [RFC PATCH 0/8] signals: Support more than 64 signals Al Viro
2022-01-04 1:00 ` Walt Drummond
2022-01-04 1:16 ` Al Viro
2022-01-04 1:49 ` Al Viro
2022-01-04 18:00 ` Eric W. Biederman
2022-01-04 20:52 ` Theodore Ts'o
2022-01-04 21:33 ` Walt Drummond
2022-01-04 22:05 ` Eric W. Biederman
2022-01-04 22:23 ` Theodore Ts'o
2022-01-04 22:31 ` Walt Drummond
2022-01-07 19:29 ` Arseny Maslennikov
2022-05-19 12:27 ` Pavel Machek
2022-01-07 19:19 ` 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=YdP2yvYfmMp3QKKi@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=arnd@arndb.de \
--cc=bp@alien8.de \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=dave.hansen@linux.intel.com \
--cc=dietmar.eggemann@arm.com \
--cc=hpa@zytor.com \
--cc=jirislaby@kernel.org \
--cc=juri.lelli@redhat.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=vincent.guittot@linaro.org \
--cc=walt@drummond.us \
--cc=x86@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