[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87blb7vwpd.fsf@nanos.tec.linutronix.de>
Date: Thu, 25 Mar 2021 20:51:10 +0100
From: Thomas Gleixner <tglx@...utronix.de>
To: Peter Zijlstra <peterz@...radead.org>,
Oleg Nesterov <oleg@...hat.com>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>
Cc: 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 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?
> 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.
Thanks,
tglx
Powered by blists - more mailing lists