From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5CEF9C433EF for ; Sat, 25 Sep 2021 10:32:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3D59B6124B for ; Sat, 25 Sep 2021 10:32:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244496AbhIYKeL (ORCPT ); Sat, 25 Sep 2021 06:34:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233380AbhIYKeA (ORCPT ); Sat, 25 Sep 2021 06:34:00 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 676DBC061570 for ; Sat, 25 Sep 2021 03:32:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=GQsiNXKkdSWCgdiriw76mEZVS2By0QMkbd+bhGBkFcw=; b=tofAG10O1c/O3BP+eJApnIDbJX cBH7elfkiZS9ebXHNEItnUOiEMV2tw1RvK1sl5ZiJ/fJjtZ3hFFPQ0sKTxEYcu3HrTV52NdyBseWz 3TZXCpLfxdfh0+VW5tce2WC9gBa3a+mOl0Qt9ZzonTWfSDzcjX4/CDfBPY6ELitlzr5i4tdnxUzCc QrPFDk4NwWUt4AVZrOufO0P1B4iblfHEqgktiqjkjPKG9fSdt4eG2ZGFPaAvD94E6D3XaMLcolqQM fTTilfL09jW56/iGQnQMk1hH/hJyzoD+Jm3xIzM7OU5OdCHXet2+gXf9PijMpnPjL65hZhJfJMV9C MTvnS06w==; Received: from hch by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mU4yG-0081Th-KK; Sat, 25 Sep 2021 10:31:56 +0000 Date: Sat, 25 Sep 2021 11:31:52 +0100 From: Christoph Hellwig To: Sebastian Andrzej Siewior Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , Thomas Gleixner Subject: Re: [PATCH] smp: Wake ksoftirqd on PREEMPT_RT instead do_softirq(). Message-ID: References: <20210924094755.2m32pgqwrqw2cg2s@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210924094755.2m32pgqwrqw2cg2s@linutronix.de> X-SRS-Rewrite: SMTP reverse-path rewritten from by casper.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 24, 2021 at 11:47:55AM +0200, Sebastian Andrzej Siewior wrote: > + if (local_softirq_pending()) { > + > + if (!IS_ENABLED(CONFIG_PREEMPT_RT)) { > + do_softirq(); > + } else { > + struct task_struct *ksoftirqd = this_cpu_ksoftirqd(); > + > + if (ksoftirqd && !task_is_running(ksoftirqd)) > + wake_up_process(ksoftirqd); > + } > + } At a cosmetic level this looks pretty weird. Why the empty line inside the indented block? Why the pointless negation instead of the obvious more straightforward order?