mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Oleg Nesterov <oleg@redhat.com>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	linux-kernel@vger.kernel.org, adobriyan@gmail.com,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Ingo Molnar <mingo@kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [RFC][PATCH] task_struct::state frobbing
Date: Fri, 26 Mar 2021 08:56:40 +0100	[thread overview]
Message-ID: <YF2TuBQxU3om/rmT@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <87blb7vwpd.fsf@nanos.tec.linutronix.de>

On Thu, Mar 25, 2021 at 08:51:10PM +0100, Thomas Gleixner wrote:
> On Thu, Mar 25 2021 at 19:11, Peter Zijlstra wrote:
> > --- a/block/blk-mq.c
> > +++ b/block/blk-mq.c
> > @@ -3867,7 +3867,7 @@ static bool blk_mq_poll_hybrid(struct request_queue *q,
> >  int blk_poll(struct request_queue *q, blk_qc_t cookie, bool spin)
> >  {
> >  	struct blk_mq_hw_ctx *hctx;
> > -	long state;
> > +	unsigned int state;
> >  
> >  	if (!blk_qc_t_valid(cookie) ||
> >  	    !test_bit(QUEUE_FLAG_POLL, &q->queue_flags))
> > @@ -3891,7 +3891,7 @@ int blk_poll(struct request_queue *q, blk_qc_t cookie, bool spin)
> >  
> >  	hctx->poll_considered++;
> >  
> > -	state = current->state;
> > +	state = READ_ONCE(current->__state);
> 
> Can we please have get_current_state() for that?

Sure...

> >  static bool io_wq_worker_affinity(struct io_worker *worker, void *data)
> >  {
> > -	struct task_struct *task = worker->task;
> > -	struct rq_flags rf;
> > -	struct rq *rq;
> > -
> > -	rq = task_rq_lock(task, &rf);
> > -	do_set_cpus_allowed(task, cpumask_of_node(worker->wqe->node));
> > -	task->flags |= PF_NO_SETAFFINITY;
> > -	task_rq_unlock(rq, task, &rf);
> > +	set_cpus_allowed_ptr(worker->task, cpumask_of_node(worker->wqe->node));
> 
> Duh, I thought we got all of them by now.

It's new and horrible crap, already send an email to Jens about it. It
shouldn't be in this patch, but I didn't clean up.

      reply	other threads:[~2021-03-26  7:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-25 18:11 Peter Zijlstra
2021-03-25 18:27 ` Oleg Nesterov
2021-03-26  7:58   ` Peter Zijlstra
2021-03-25 18:33 ` Steven Rostedt
2021-03-25 19:51 ` Thomas Gleixner
2021-03-26  7:56   ` 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=YF2TuBQxU3om/rmT@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=adobriyan@gmail.com \
    --cc=bigeasy@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=oleg@redhat.com \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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

all inboxes | Powered by JetHome®