From: Thomas Gleixner <tglx@linutronix.de>
To: Mingzhe Yang <cainiao666999@gmail.com>, peterz@infradead.org
Cc: linux-kernel@vger.kernel.org, yuxin.wooo@gmail.com,
becausehan@gmail.com, huan.xie@suse.com,
Mingzhe Yang <cainiao666999@gmail.com>
Subject: Re: [PATCH] tasklets: simplify code in tasklet_action_common()
Date: Tue, 10 Aug 2021 15:12:11 +0200 [thread overview]
Message-ID: <87czqlsatw.ffs@tglx> (raw)
In-Reply-To: <20210430122521.13957-1-cainiao666999@gmail.com>
On Fri, Apr 30 2021 at 20:25, Mingzhe Yang wrote:
> Use tasklet_is_disabled() to simplify the code in
> tasklet_action_common.
This changelog is not really helpful. Use a new function does not tell
anything. Neither does it explain why there need to be two new functions
and worse
> +static inline bool tasklet_is_enabled(struct tasklet_struct *t)
> +{
> + smp_rmb();
why there is suddenly a new undocumented SMP barrier in the code.
> + return !atomic_read(&t->count);
> +}
> +
> +static inline bool tasklet_is_disabled(struct tasklet_struct *t)
> +{
> + return !tasklet_is_enabled(t);
> +}
> +
Aside of that there is no point in exposing these functions in a global
header.
Thanks,
tglx
next prev parent reply other threads:[~2021-08-10 13:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-30 12:25 [PATCH] tasklets: simplify code in tasklet_action_common() Mingzhe Yang
2021-08-10 13:12 ` Thomas Gleixner [this message]
2021-08-25 10:07 ` Mingzhe Yang
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=87czqlsatw.ffs@tglx \
--to=tglx@linutronix.de \
--cc=becausehan@gmail.com \
--cc=cainiao666999@gmail.com \
--cc=huan.xie@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=yuxin.wooo@gmail.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