All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: jun qian <qianjun.kernel@gmail.com>
Cc: kernel test robot <lkp@intel.com>,
	peterz@infradead.org, will@kernel.org, luto@kernel.org,
	linux-kernel@vger.kernel.org, Uladzislau Rezki <urezki@gmail.com>,
	Yafang Shao <laoar.shao@gmail.com>,
	lkp@lists.01.org
Subject: Re: [Softirq] a76eadba0d: WARNING:at_net/mac80211/rx.c:#ieee80211_rx_napi[mac80211]
Date: Thu, 23 Jul 2020 16:35:55 +0200	[thread overview]
Message-ID: <874kpyxpro.fsf@nanos.tec.linutronix.de> (raw)
In-Reply-To: <CAKc596KA2moT7fgO+Ount5trEbtrYsuLbde5S5Ou-c4EQbHb3g@mail.gmail.com>

jun qian <qianjun.kernel@gmail.com> writes:
> On Thu, Jul 23, 2020 at 6:58 PM Thomas Gleixner <tglx@linutronix.de> wrote:
>> That drops everything which has not yet been processed and the above
>> warning is due to this.
>>
> wow, I made a mistake, thank you for finding the cause of the problem
> so quickly.
>
> How about the following code.   we need to clear the corresponding
> pending bit at the
> right time Instead of all the pending bits cleared in the start.
>
> pending = softirq_pending();
>
> while ((softirq_bit = ffs(pending))) {
>
>         pending >>= softirq_bit;
>
>         set_softirq_pending(pending);  //Only clear the corresponding
> bit which will be processed.

How is that supposed to be correct. pending has been shifted
right. Something like this should work:

 		h++;
 		pending >>= softirq_bit;

		if (timeout()) {
			/*
			 * Ensure that the remaining pending bits
			 * are handled.
			 */
			or_softirq_pending(pending << (vec_nr + 1));
			break;
		}
 	}

Thanks,

        tglx


  reply	other threads:[~2020-07-23 14:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-20 13:08 [RFC PATCH v2] Softirq:avoid large sched delay from the pending softirqs qianjun.kernel
2020-07-22  4:58 ` jun qian
2020-07-22 18:05 ` Thomas Gleixner
2020-07-23  4:48   ` jun qian
2020-07-23  9:17 ` [Softirq] a76eadba0d: WARNING:at_net/mac80211/rx.c:#ieee80211_rx_napi[mac80211] kernel test robot
2020-07-23 10:58   ` Thomas Gleixner
2020-07-23 13:57     ` jun qian
2020-07-23 14:35       ` Thomas Gleixner [this message]
2020-07-24  5:35         ` jun qian
2020-07-24 23:31           ` Thomas Gleixner

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=874kpyxpro.fsf@nanos.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=laoar.shao@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=lkp@lists.01.org \
    --cc=luto@kernel.org \
    --cc=peterz@infradead.org \
    --cc=qianjun.kernel@gmail.com \
    --cc=urezki@gmail.com \
    --cc=will@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.