Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1384467ybh; Thu, 23 Jul 2020 07:36:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZ6Jr0y/K6bjJiO/EztWJ3n/s6gxckG976JhtSY4kByhbQbX3smP2yfaAjTJLCoLffKekt X-Received: by 2002:a17:906:c209:: with SMTP id d9mr4909317ejz.449.1595514999094; Thu, 23 Jul 2020 07:36:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595514999; cv=none; d=google.com; s=arc-20160816; b=0iDxQpkN0yZXElS93MNHCAavSYuUYy/Ai72v5YbTQ5JaJrf9M4c1NXek3j2BSs6yMA 6rknXia0Mt61HPCYhPKgZ7j2yHXLl25EEt8qbA8kogQNnNY2rkFGgTTNDTR7kVUtCLKO 2A4wHx2Aya/PyM+uWPQkRJLJMwXsMvU8Xc/iE2YSNmAFOyHbPp3Cs/EXyJ2BE7aLFYSG itYXg1zMzWYun3dnYQ9votSW5XQwE2IwKL+wvKLN/NV1E7YAdJlFbX0xlA3GJmAcMvG6 5Y/6yDg1ZsHIkOMcPmIQgGid5O2vphu0RJGAQ4+if/kRCaQbDv2I0cb/hMu9Ty9RCruQ IeJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=y234A0N+4L8sN2FORcO+Y6jvXnKOK0C6odNkjkL7vtc=; b=0YWfzBFNIipnYcZp7ju8nLYEKjHExeh5WdzgEXuuPOBa/lknDn1Z0Iv4bBzdnv2Ee5 hXTnkb79vwyMLrl5BDQFNGaI2HB65NCh9MKks1Ld6F16aITpxInR8eRNpJ1P3MGE9cv0 E4Pll2MN/uSAwOxYmYU5GW+QBaVVyi6C7mDeokyLL7MV4gnX1kli3tkk3mvFZIIeSBjA 0wCF8H0kYBjcZYUto842U2LKdBr8wSsD5Vb5gP2w/v/3S0wf90Cts46N2pp0uIhR8RNt 0T9sBYjj3PY8DwV4ulXB6Og6RAmsrA5wUR3BkvjFSQOpgWec4Ya4fYjshc0TEtK5VmET Fh9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=UonPmNKR; dkim=neutral (no key) header.i=@linutronix.de header.b=Gr7awscG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b6si2039605edr.578.2020.07.23.07.36.15; Thu, 23 Jul 2020 07:36:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=UonPmNKR; dkim=neutral (no key) header.i=@linutronix.de header.b=Gr7awscG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728991AbgGWOf5 (ORCPT + 99 others); Thu, 23 Jul 2020 10:35:57 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:58462 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727108AbgGWOf5 (ORCPT ); Thu, 23 Jul 2020 10:35:57 -0400 From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1595514955; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=y234A0N+4L8sN2FORcO+Y6jvXnKOK0C6odNkjkL7vtc=; b=UonPmNKR4l7pudqSjAmA2Uq4BuGqrVcHUrl8t4wonBad1pnli+ovzq/158q/6rtxxyLVBz mlWu6uW41P3JyzXAD89QnQBtoUsHLa5f12U4/yh7Ytx+y2O7SwhwUhlrcP0DbfQJ69Ke8v 5S373KOS+wQamQCHari44BM+XkJxV2cBsj5/fCv36fIbGlYaoYR3IlOCK1PCksRvIYKGsH Tzky/NhAQTCBVK8EbBMc2mxVSvQCY2q0bdJ14tKsQsRkgvKbJCthbqyaDrM4szM5d1j3P3 yP8axeXluzYvz91QgFBvPdsnbZIabTvAewjqZwpyXA3CHEmKMG9ihmfFIZmWmg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1595514955; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=y234A0N+4L8sN2FORcO+Y6jvXnKOK0C6odNkjkL7vtc=; b=Gr7awscGMa4ckB+KdifUwm436D4jC6LmA86yaN5az0aQ5wWgHiP7VlRAIhEkCByvm8Mdp0 WpBAehSD3Gi+BmAg== To: jun qian Cc: kernel test robot , peterz@infradead.org, will@kernel.org, luto@kernel.org, linux-kernel@vger.kernel.org, Uladzislau Rezki , Yafang Shao , lkp@lists.01.org Subject: Re: [Softirq] a76eadba0d: WARNING:at_net/mac80211/rx.c:#ieee80211_rx_napi[mac80211] In-Reply-To: References: <20200723091715.GL19262@shao2-debian> <87v9iexztl.fsf@nanos.tec.linutronix.de> Date: Thu, 23 Jul 2020 16:35:55 +0200 Message-ID: <874kpyxpro.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org jun qian writes: > On Thu, Jul 23, 2020 at 6:58 PM Thomas Gleixner 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