From: Thomas Gleixner <tglx@linutronix.de>
To: Peter Zijlstra <peterz@infradead.org>,
Oleg Nesterov <oleg@redhat.com>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: 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: Thu, 25 Mar 2021 20:51:10 +0100 [thread overview]
Message-ID: <87blb7vwpd.fsf@nanos.tec.linutronix.de> (raw)
In-Reply-To: <YFzSWR6mAGitxMqA@hirez.programming.kicks-ass.net>
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
next prev parent reply other threads:[~2021-03-25 19:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-25 18:11 [RFC][PATCH] task_struct::state frobbing 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 [this message]
2021-03-26 7:56 ` Peter Zijlstra
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=87blb7vwpd.fsf@nanos.tec.linutronix.de \
--to=tglx@linutronix.de \
--cc=adobriyan@gmail.com \
--cc=bigeasy@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.