Re: [PATCH] block: convert tasklets to use new tasklet_setup() API
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: Re: [PATCH] block: convert tasklets to use new tasklet_setup() API
- From: Jens Axboe <axboe@xxxxxxxxx>
- Date: Mon, 17 Aug 2020 12:44:34 -0700
- Cc: Allen Pais <allen.cryptic@xxxxxxxxx>, jdike@xxxxxxxxxxx, richard@xxxxxx, anton.ivanov@xxxxxxxxxxxxxxxxxx, 3chas3@xxxxxxxxx, stefanr@xxxxxxxxxxxxxxxxx, airlied@xxxxxxxx, daniel@xxxxxxxx, sre@xxxxxxxxxx, James.Bottomley@xxxxxxxxxxxxxxxxxxxxx, kys@xxxxxxxxxxxxx, deller@xxxxxx, dmitry.torokhov@xxxxxxxxx, jassisinghbrar@xxxxxxxxx, shawnguo@xxxxxxxxxx, s.hauer@xxxxxxxxxxxxxx, maximlevitsky@xxxxxxxxx, oakad@xxxxxxxxx, ulf.hansson@xxxxxxxxxx, mporter@xxxxxxxxxxxxxxxxxxx, alex.bou9@xxxxxxxxx, broonie@xxxxxxxxxx, martyn@xxxxxxxxxxxx, manohar.vanga@xxxxxxxxx, mitch@xxxxxxxxxx, davem@xxxxxxxxxxxxx, kuba@xxxxxxxxxx, linux-um@xxxxxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-atm-general@xxxxxxxxxxxxxxxxxxxxx, netdev@xxxxxxxxxxxxxxx, linux-block@xxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, openipmi-developer@xxxxxxxxxxxxxxxxxxxxx, linux1394-devel@xxxxxxxxxxxxxxxxxxxxx, intel-gfx@xxxxxxxxxxxxxxxxxxxxx, dri-devel@xxxxxxxxxxxxxxxxxxxxx, linux-hyperv@xxxxxxxxxxxxxxx, linux-parisc@xxxxxxxxxxxxxxx, linux-input@xxxxxxxxxxxxxxx, linux-mmc@xxxxxxxxxxxxxxx, linux-ntb@xxxxxxxxxxxxxxxx, linux-s390@xxxxxxxxxxxxxxx, linux-spi@xxxxxxxxxxxxxxx, devel@xxxxxxxxxxxxxxxxxxxx, Allen Pais <allen.lkml@xxxxxxxxx>, Romain Perier <romain.perier@xxxxxxxxx>
- In-reply-to: <202008171228.29E6B3BB@keescook>
- References: <20200817091617.28119-1-allen.cryptic@gmail.com> <20200817091617.28119-2-allen.cryptic@gmail.com> <b5508ca4-0641-7265-2939-5f03cbfab2e2@kernel.dk> <202008171228.29E6B3BB@keescook>
- User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0
On 8/17/20 12:29 PM, Kees Cook wrote:
> On Mon, Aug 17, 2020 at 06:56:47AM -0700, Jens Axboe wrote:
>> On 8/17/20 2:15 AM, Allen Pais wrote:
>>> From: Allen Pais <allen.lkml@xxxxxxxxx>
>>>
>>> In preparation for unconditionally passing the
>>> struct tasklet_struct pointer to all tasklet
>>> callbacks, switch to using the new tasklet_setup()
>>> and from_tasklet() to pass the tasklet pointer explicitly.
>>
>> Who came up with the idea to add a macro 'from_tasklet' that is just
>> container_of? container_of in the code would be _much_ more readable,
>> and not leave anyone guessing wtf from_tasklet is doing.
>>
>> I'd fix that up now before everything else goes in...
>
> As I mentioned in the other thread, I think this makes things much more
> readable. It's the same thing that the timer_struct conversion did
> (added a container_of wrapper) to avoid the ever-repeating use of
> typeof(), long lines, etc.
But then it should use a generic name, instead of each sub-system using
some random name that makes people look up exactly what it does. I'm not
huge fan of the container_of() redundancy, but adding private variants
of this doesn't seem like the best way forward. Let's have a generic
helper that does this, and use it everywhere.
--
Jens Axboe
[Index of Archives]
[Linux Kernel]
[Linux ARM (vger)]
[Linux ARM MSM]
[Linux Omap]
[Linux Arm]
[Linux Tegra]
[Fedora ARM]
[Linux for Samsung SOC]
[eCos]
[Linux Fastboot]
[Gcc Help]
[Git]
[DCCP]
[IETF Announce]
[Security]
[Linux MIPS]
[Yosemite Campsites]
|