From patchwork Tue Mar 9 08:42:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 396545 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E79A6C433DB for ; Tue, 9 Mar 2021 08:46:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AEAFE652AC for ; Tue, 9 Mar 2021 08:46:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230408AbhCIIpl (ORCPT ); Tue, 9 Mar 2021 03:45:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229689AbhCIIpc (ORCPT ); Tue, 9 Mar 2021 03:45:32 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51E48C06174A; Tue, 9 Mar 2021 00:45:32 -0800 (PST) Message-Id: <20210309084203.995862150@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1615279528; 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: content-transfer-encoding:content-transfer-encoding; bh=mZxOEHDPd7/Yp3jcQ6vX00DvouRsaIVMYYEagknQzH4=; b=Pem8P80FNqHdBxpXQLkPBDFYuiHjeDymKfehbwsz/b1kGrF8hxRZHjcB0BhbEi0tYFK3w/ BvNAqsOu+EnaeExoSwWbeBeauy2mlnaXuFGPa7JcLx2A9v/k4eCe6RRM+U0+r7S06BNwQx wUsQPMPUp19sXB+xZ121zRjjElwqfff7Z2/PiVvr047M3uP9RlloCoXzjrmHJfqiqW+avM pvX/W6cykYbmm0w34eTR4Df24lH+ibfjDqUFX7etZybTsYGnIuHufnDnv+rQttkR7bqNPb 5Z8XsGmKkjpCta/WCKgUVCL2cGyobxfPP4i9UE3C2nlW5Qmi1idzLoQ+AE0/7Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1615279528; 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: content-transfer-encoding:content-transfer-encoding; bh=mZxOEHDPd7/Yp3jcQ6vX00DvouRsaIVMYYEagknQzH4=; b=NgBOeQII7dm+zP1gHyz4eJT6xN4otLYu1EkP7jvNbsyhCMaNZ4c2OHSt4hh2ZU9hqPBolR Rk7BixzutQhr0UCA== Date: Tue, 09 Mar 2021 09:42:03 +0100 From: Thomas Gleixner To: LKML Cc: Frederic Weisbecker , Sebastian Andrzej Siewior , "Ahmed S. Darwish" , Peter Zijlstra , Denis Kirjanov , "David S. Miller" , Jakub Kicinski , netdev@vger.kernel.org, ath9k-devel@qca.qualcomm.com, Kalle Valo , linux-wireless@vger.kernel.org, Chas Williams <3chas3@gmail.com>, linux-atm-general@lists.sourceforge.net, "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Wei Liu , Lorenzo Pieralisi , Rob Herring , Bjorn Helgaas , linux-hyperv@vger.kernel.org, linux-pci@vger.kernel.org, Stefan Richter , linux1394-devel@lists.sourceforge.net Subject: [patch 00/14] tasklets: Replace the spin wait loops and make it RT safe MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This is a follow up to the review comments of the series which makes softirq processing PREEMPT_RT safe: https://lore.kernel.org/r/20201207114743.GK3040@hirez.programming.kicks-ass.net Peter suggested to replace the spin waiting in tasklet_disable() and tasklet_kill() with wait_event(). This also gets rid of the ill defined sched_yield() in tasklet_kill(). Analyzing all usage sites of tasklet_disable() and tasklet_unlock_wait() we found that most of them are safe to be converted to a sleeping wait. Only a few instances invoke tasklet_disable() from atomic context. A few bugs which have been found in course of this analysis have been already addressed seperately. The following series takes the following approach: 1) Provide a variant of tasklet_disable() which can be invoked from atomic contexts 2) Convert the usage sites which cannot be easily changed to a sleepable wait to use this new function 3) Replace the spin waits in tasklet_disable() and tasklet_kill() with sleepable variants. If this is agreed on then the merging can be either done in bulk or the first 4 patches could be applied on top of rc2 and tagged for consumption in the relevant subsystem trees (networking, pci, firewire). In this case the last patch which changes the implementation of tasklet_disable() has to be post-poned until all other changes have reached mainline. The series is also available from git: git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git tasklet-2021-03-09 Thanks, tglx Acked-by: Peter Zijlstra (Intel)