From: Jens Axboe <axboe@kernel.dk>
To: Bart Van Assche <bvanassche@acm.org>, Ming Lei <ming.lei@redhat.com>
Cc: linux-kernel@vger.kernel.org, linux-block@vger.kernel.org,
Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH] kernel: export task_work_add
Date: Wed, 7 Sep 2022 07:44:05 -0600 [thread overview]
Message-ID: <2d4655d4-2510-eb1e-2e4d-9d910e823293@kernel.dk> (raw)
In-Reply-To: <5a1b3716-bcf8-8c37-2bd5-44e885de1f48@acm.org>
On 9/7/22 7:08 AM, Bart Van Assche wrote:
> On 8/28/22 21:00, Ming Lei wrote:
>> Firstly task_work_add() is used in several drivers. In ublk driver's
>> usage, request batching submission can only be applied with task_work_add,
>> and usually get better IOPS.
>>
>> Secondly from this API's definition, the added work is always run in
>> the task context, and when task is exiting, either the work is rejected
>> to be added, or drained in do_exit(). In this way, not see obvious
>> disadvantage or potential issue by exporting it for module's usage.
>>
>> So export it, then ublk driver can get simplified, meantime with better
>> performance.
>
> If task_work_add() is exported, shouldn't task_work_cancel() be exported
> too? Anyway:
Not if it isn't currently used...
On the patch itself, it definitely makes sense in the context of ublk.
My hesitation is mostly around not really wanting to export this to
generic modular users. It's OK for core interfaces, of which ublk is
on the way to becoming, but I really don't like the idea of random
modules using it. But that's not really something we can manage with
the export, it's either exported or it's not...
--
Jens Axboe
next prev parent reply other threads:[~2022-09-07 13:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-29 4:00 [PATCH] kernel: export task_work_add Ming Lei
2022-09-07 0:44 ` Ming Lei
2022-09-07 13:08 ` Bart Van Assche
2022-09-07 13:44 ` Jens Axboe [this message]
2022-09-07 14:05 ` Christoph Hellwig
2022-09-07 14:12 ` Jens Axboe
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=2d4655d4-2510-eb1e-2e4d-9d910e823293@kernel.dk \
--to=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ming.lei@redhat.com \
/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