From: Thomas Gleixner <tglx@linutronix.de>
To: Christoph Hellwig <hch@lst.de>, axboe@kernel.dk
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] task_work: simplify the task_work_add() interface
Date: Tue, 15 Mar 2022 15:58:49 +0100 [thread overview]
Message-ID: <87y21b5kk6.ffs@tglx> (raw)
In-Reply-To: <20220223072754.616027-1-hch@lst.de>
On Wed, Feb 23 2022 at 08:27, Christoph Hellwig wrote:
> Provide a low-level task_work_add_nonotify interface that just adds
> the work to the list and open code the TWA_SIGNAL and TWA_NONE callers
> using it. task_work_add() itself now only handles the common TWA_RESUME
> case and can drop the notify argument.
There is a distinct lack of justification in that change log.
> worker->create_index = acct->index;
> - if (!task_work_add(wq->task, &worker->create_work, TWA_SIGNAL)) {
> + if (!task_work_add_nonotify(wq->task, &worker->create_work)) {
> + set_notify_signal(wq->task);
I fail to see the improvement here.
> @@ -9606,7 +9606,7 @@ static __cold void io_ring_exit_work(struct work_struct *work)
> ctx_node);
> /* don't spin on a single task if cancellation failed */
> list_rotate_left(&ctx->tctx_list);
> - ret = task_work_add(node->task, &exit.task_work, TWA_SIGNAL);
> + ret = task_work_add_nonotify(node->task, &exit.task_work);
While I clearly see the regression in this case ...
> if (WARN_ON_ONCE(ret))
> continue;
> /**
> - * task_work_add - ask the @task to execute @work->func()
> + * task_work_add_nonotify - ask the @task to execute @work->func()
> * @task: the task which should run the callback
> * @work: the callback to run
> * @notify: how to notify the targeted task
This parameter is removed below ...
Thanks,
tglx
next prev parent reply other threads:[~2022-03-15 14:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-23 7:27 [PATCH] task_work: simplify the task_work_add() interface Christoph Hellwig
2022-03-03 10:55 ` Christoph Hellwig
2022-03-10 7:05 ` Christoph Hellwig
2022-03-10 12:43 ` Jens Axboe
2022-03-10 14:27 ` Christoph Hellwig
2022-03-15 14:58 ` Thomas Gleixner [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-01-04 7:24 Christoph Hellwig
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=87y21b5kk6.ffs@tglx \
--to=tglx@linutronix.de \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).