Linux-rt-users archive on lore.kernel.org
 help / color / Atom feed
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Tom Zanussi <zanussi@kernel.org>
Cc: linux-rt-users <linux-rt-users@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [4.19 stable-rt PATCH] tasklet: Fix UP case for tasklet CHAINED state
Date: Tue, 9 Jun 2020 18:38:32 +0200
Message-ID: <20200609163832.vicpmza6qgxalhmg@linutronix.de> (raw)
In-Reply-To: <7642da1ef2578601d8c2b7bb739b0f8451e69bed.camel@kernel.org>

On 2020-06-09 11:21:44 [-0500], Tom Zanussi wrote:
> index 73dae64bfc9c..4f37a6173ab9 100644
> --- a/kernel/softirq.c
> +++ b/kernel/softirq.c
> @@ -947,10 +947,12 @@ static void __tasklet_schedule_common(struct tasklet_struct *t,
>  	 * is locked before adding it to the list.
>  	 */
>  	if (test_bit(TASKLET_STATE_SCHED, &t->state)) {
> +#if defined(CONFIG_SMP)
>  		if (test_and_set_bit(TASKLET_STATE_CHAINED, &t->state)) {
>  			tasklet_unlock(t);
>  			return;
>  		}
> +#endif
>  		t->next = NULL;
>  		*head->tail = t;
>  		head->tail = &(t->next);
> @@ -1044,7 +1046,11 @@ static void tasklet_action_common(struct softirq_action *a,
>  again:
>  		t->func(t->data);
>  
> +#if !defined(CONFIG_SMP)
> +		while (!tasklet_tryunlock(t)) {
> +#else
>  		while (cmpxchg(&t->state, TASKLET_STATEF_RC, 0) != TASKLET_STATEF_RC) {
> +#endif

This is still needed for RT && !SMP

>  			/*
>  			 * If it got disabled meanwhile, bail out:
>  			 */

Sebastian

  reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-09 16:21 Tom Zanussi
2020-06-09 16:38 ` Sebastian Andrzej Siewior [this message]
2020-06-09 16:59   ` Tom Zanussi

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=20200609163832.vicpmza6qgxalhmg@linutronix.de \
    --to=bigeasy@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=zanussi@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

Linux-rt-users archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-rt-users/0 linux-rt-users/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-rt-users linux-rt-users/ https://lore.kernel.org/linux-rt-users \
		linux-rt-users@vger.kernel.org
	public-inbox-index linux-rt-users

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-rt-users


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git