From: Peter Zijlstra <peterz@infradead.org>
To: Jiri Slaby <jirislaby@kernel.org>
Cc: Walt Drummond <walt@drummond.us>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
ar@cs.msu.ru, linux-kernel@vger.kernel.org,
Oleg Nesterov <oleg@redhat.com>, mm <linux-mm@kvack.org>,
Ingo Molnar <mingo@redhat.com>
Subject: Re: [PATCH 3/3] status: Display an informational message when the VSTATUS character is pressed or TIOCSTAT ioctl is called.
Date: Tue, 18 Jan 2022 15:29:07 +0100 [thread overview]
Message-ID: <YebOs1OWRAru2v5B@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <YeamX3ELWyc/BtGp@hirez.programming.kicks-ass.net>
On Tue, Jan 18, 2022 at 12:37:03PM +0100, Peter Zijlstra wrote:
> > > +static 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) {
>
> That's not an ordered set, please don't do that.
*sigh*.. sorry about that, I can't read, for some reason I thought you
did: ostate < nstate...
> > > + if (old->start_time > new->start_time)
> > > + return old;
> > > + return new;
> > > + }
> > > +
> > > + if (ostate < nstate)
> > > + return old;
> > > +
> > > + return new;
> > > +}
prev parent reply other threads:[~2022-01-18 14:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20220118044323.765038-1-walt@drummond.us>
[not found] ` <20220118044323.765038-3-walt@drummond.us>
2022-01-18 10:29 ` Jiri Slaby
2022-01-18 11:37 ` Peter Zijlstra
2022-01-18 14:29 ` Peter Zijlstra [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=YebOs1OWRAru2v5B@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=ar@cs.msu.ru \
--cc=gregkh@linuxfoundation.org \
--cc=jirislaby@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@redhat.com \
--cc=oleg@redhat.com \
--cc=walt@drummond.us \
/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