[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YF2TuBQxU3om/rmT@hirez.programming.kicks-ass.net>
Date: Fri, 26 Mar 2021 08:56:40 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: Oleg Nesterov <oleg@...hat.com>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
linux-kernel@...r.kernel.org, adobriyan@...il.com,
Linus Torvalds <torvalds@...ux-foundation.org>,
Ingo Molnar <mingo@...nel.org>,
Steven Rostedt <rostedt@...dmis.org>
Subject: Re: [RFC][PATCH] task_struct::state frobbing
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.
Powered by blists - more mailing lists