Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4884690pxj; Wed, 12 May 2021 15:39:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyzt35XXWnCZ1SMwqkKADm5GS6JBpsvnUFeqs+1hYMPrOp26z3zlSNICwD3kypaGSHzBsqg X-Received: by 2002:a05:6830:160d:: with SMTP id g13mr32898359otr.176.1620859158241; Wed, 12 May 2021 15:39:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620859158; cv=none; d=google.com; s=arc-20160816; b=ocyYdBGIYVgX7K1DexDGzbJvXVop4gJxhvsNwel+V+e3eW7Jm0xJtw3O1nBoXpQPJo X1CIRDSqFYzUJY7gN7uY2cTo/yxXzjdAplQURGCWmrVn4hhEms992r44WnInYdNSiR2d 2ms3yT4Ribs4b7C/OUlXMQFqEklKYNMIwUAXpbl0WgrHvmzWe15LXRrnMdls2JV3S802 GU+FgzyhflEL2IxyckvxAa947TsjFPIhMm74JmsQ6z/53rNQ16QcIVFB8OeHbqAM3vQ7 Q0HmOqT2d/88oCmlZeXrsd1C8ArfKMp4ePgX3lk6Ek9SDzanblLMpNXP9alLWjZ529QZ IE6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=dbExWGmhAxDcnpIgmHu93oDV58dpmOJ47YHdt243Bzg=; b=T1ktZVfnnj0xt1Z96EhFxueaqqKpOpQZMJJNbVU1SoDCBeyqGnOPQrLX5ifgzX1WO/ yzLZSWfTuREF2/kFTCt0vxbx+drn60USorYcspT8ozsdAPEtE46KpaRSqjQ1NfyBRPhr dHTDosDmiMLnXUNG41ATXPlnbCnbHLngL1rFmZM79ia/39ksPY0xTOFna5vWQCxaCVjT Yh6MfjIq5GxCRL2W1RSbWmDna1rOV1HeSwjPsr0D23Q1hyV7moZ3hi6wOKuxUvcQnmUC a5VcJEpytmyXcxKpJ8y28F3no+Utfyb4ZGjbI/hBtSp56el/bp1SKG3QSZKPLVA0cizP YqSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linutronix.de header.s=2020 header.b="ybSj//Ou"; dkim=neutral (no key) header.i=@linutronix.de header.b=ieszU9eo; 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=fail (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 b2si1298883otf.293.2021.05.12.15.39.03; Wed, 12 May 2021 15:39:18 -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=fail header.i=@linutronix.de header.s=2020 header.b="ybSj//Ou"; dkim=neutral (no key) header.i=@linutronix.de header.b=ieszU9eo; 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=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235417AbhELWhk (ORCPT + 99 others); Wed, 12 May 2021 18:37:40 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:54344 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349051AbhELW3P (ORCPT ); Wed, 12 May 2021 18:29:15 -0400 From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1620858482; 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=dbExWGmhAxDcnpIgmHu93oDV58dpmOJ47YHdt243Bzg=; b=ybSj//OuakWBcE9PFkav7BwyUiw4YIXlu6sm+YQbs5K5F9vAhiXHxGoRqsjAIIk9Z4Exdu iUSWgfopq4ollgGXfovb/QMhv/93JoH6KqCWKIV2R84J8+BhDv9PecLjEzoBBhyaLnXUqf Ksvtye4YM67a1SEyvy5lsM02RpjGcYQjJackZ7C1Pn68a+B2o8BWnme9OWEwF0WDVlhva9 L0TgeLECnUq1VzroBmzZuMKvFIlbTlNZjUM2ihtYvUQC1g/5zgn0iQXTqPpicbflZOCJBs cO2hfNCxT8ts2WWiOkEZsqaBS3PBpPx0uh/Q2f63eIidLS0T0oYuaFO2So2oNQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1620858482; 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=dbExWGmhAxDcnpIgmHu93oDV58dpmOJ47YHdt243Bzg=; b=ieszU9eoLPxYgVaGjO90h6D6agB93TQK5gB7qgQ6Dyy4ZeLzKtYjgqHC9nrgPPbzmjncfl 86BCJ4FTEN6icrCg== To: Sebastian Andrzej Siewior , netdev@vger.kernel.org Cc: Juri Lelli , linux-rt-users , Steven Rostedt , LKML , sassmann@redhat.com, "David S. Miller" , Jakub Kicinski , stable-rt@vger.kernel.org Subject: Re: [PATCH net-next] net: Treat __napi_schedule_irqoff() as __napi_schedule() on PREEMPT_RT In-Reply-To: <20210512214324.hiaiw3e2tzmsygcz@linutronix.de> References: <20210512214324.hiaiw3e2tzmsygcz@linutronix.de> Date: Thu, 13 May 2021 00:28:02 +0200 Message-ID: <87k0o360zx.ffs@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 12 2021 at 23:43, Sebastian Andrzej Siewior wrote: > __napi_schedule_irqoff() is an optimized version of __napi_schedule() > which can be used where it is known that interrupts are disabled, > e.g. in interrupt-handlers, spin_lock_irq() sections or hrtimer > callbacks. > > On PREEMPT_RT enabled kernels this assumptions is not true. Force- > threaded interrupt handlers and spinlocks are not disabling interrupts > and the NAPI hrtimer callback is forced into softirq context which runs > with interrupts enabled as well. > > Chasing all usage sites of __napi_schedule_irqoff() is a whack-a-mole > game so make __napi_schedule_irqoff() invoke __napi_schedule() for > PREEMPT_RT kernels. > > The callers of ____napi_schedule() in the networking core have been > audited and are correct on PREEMPT_RT kernels as well. > > Reported-by: Juri Lelli > Signed-off-by: Sebastian Andrzej Siewior Reviewed-by: Thomas Gleixner > --- > Alternatively __napi_schedule_irqoff() could be #ifdef'ed out on RT and > an inline provided which invokes __napi_schedule(). > > This was not chosen as it creates #ifdeffery all over the place and with > the proposed solution the code reflects the documentation consistently > and in one obvious place. Blame me for that decision. No matter which variant we end up with, this needs to go into all stable RT kernels ASAP. Thanks, tglx