Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2411084ioo; Sat, 28 May 2022 12:45:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwdFOevvKsNEmwDFgSv6/W2M4Tu5mhUh/jlEkk4P0nN8rKk0TBaFbsplh9PmwYViwsqzWsj X-Received: by 2002:a65:6205:0:b0:3f5:d436:5446 with SMTP id d5-20020a656205000000b003f5d4365446mr41371053pgv.532.1653767154263; Sat, 28 May 2022 12:45:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653767154; cv=none; d=google.com; s=arc-20160816; b=t37CKBEP1KoMAI49KIldubkN3XsvQQ1TZfPi8bajZaifHpEAD50+M2bI291j1wcexO 0WfYz2D3yxTUO9VZtp2BFoRZo/j3YdF48ciFKGxLDrKsPZPKz9vMY8ABSLKx1bCL5y+O 7Rr8e12S3OUQiCDAvDZ7VIh9bS7RB/KXuqKstAWdnESdo614vHquSInegGhBZgyru8rJ 0R9yVBNbUcYNSMAT7LmUjHtCaTPnx0QBl27hV+j/HiAE0sCPeH2KrEyT/evwLTLGoVjO 22XEOAgbftxqcvZ6Alew02YPKPJ/lhuf0G+45hC/k5y7vWYdwdlxkllNx0yu9bUKCM5l HtTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=IDtquor6jjes0SO88dBV8K/h84kXfmoZMX1GCHCkpiE=; b=JZrHAjz0gfT9Ke5DwPTw1qe+XS1a0+hEtoetnlpPYhS/UQ/IuNU2qre7k1vvBopvd/ jPfkxims1Nc9EX+/7i5p88APVFL5L4edCmT9e+1NKIp+LBqDtb5rNpkblyjfW7qPX2GJ 89V6mU/4/rg2hx27398W7hU+xA1+YwnTiarsbSe+fffNg7MepGls9A1hhwZFueKDlsLj 7B+FhiomeMABZUTYIlg0HUYjwSD51YqDdDR0LMZRQPgcXYX8tuynIa4oGQWGpgBs8ujJ E7J/eRypyzKHPPmVa4vnZOPO/QnLvpPuclJeieXPisB/BxNwHviCba/D/lbRj7mekdTA u2wQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id c34-20020a634e22000000b003f6456673acsi10637886pgb.20.2022.05.28.12.45.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 May 2022 12:45:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id E154B67D16; Sat, 28 May 2022 12:08:30 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347514AbiEZUhT (ORCPT + 99 others); Thu, 26 May 2022 16:37:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41892 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345528AbiEZUhQ (ORCPT ); Thu, 26 May 2022 16:37:16 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 33438496A6 for ; Thu, 26 May 2022 13:37:15 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id C34BEB820CB for ; Thu, 26 May 2022 20:37:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D84A5C385A9; Thu, 26 May 2022 20:37:11 +0000 (UTC) Date: Thu, 26 May 2022 16:37:10 -0400 From: Steven Rostedt To: John Ogness Cc: Petr Mladek , Sergey Senozhatsky , Thomas Gleixner , linux-kernel@vger.kernel.org Subject: Re: [PATCH] Revert "printk: wake up all waiters" Message-ID: <20220526163710.0a2cd6f4@gandalf.local.home> In-Reply-To: <20220526203056.81123-1-john.ogness@linutronix.de> References: <20220526203056.81123-1-john.ogness@linutronix.de> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 26 May 2022 22:36:56 +0206 John Ogness wrote: > This reverts commit 938ba4084abcf6fdd21d9078513c52f8fb9b00d0. > > The wait queue @log_wait never has exclusive waiters, so there > is no need to use wake_up_interruptible_all(). Using > wake_up_interruptible() was the correct function to wake all > waiters. > > Since there are no exclusive waiters, erroneously changing > wake_up_interruptible() to wake_up_interruptible_all() did not > result in any behavior change. However, using > wake_up_interruptible_all() on a wait queue without exclusive > waiters is fundamentally wrong. > > Go back to using wake_up_interruptible() to wake all waiters. (Just to show that I have been paying attention ;-) Acked-by: Steven Rostedt (Google) -- Steve > > Signed-off-by: John Ogness > --- > kernel/printk/printk.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c > index a3e1035929b0..ea3dd55709e7 100644 > --- a/kernel/printk/printk.c > +++ b/kernel/printk/printk.c > @@ -3904,7 +3904,7 @@ static void wake_up_klogd_work_func(struct irq_work *irq_work) > } > > if (pending & PRINTK_PENDING_WAKEUP) > - wake_up_interruptible_all(&log_wait); > + wake_up_interruptible(&log_wait); > } > > static DEFINE_PER_CPU(struct irq_work, wake_up_klogd_work) =