Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp2360065ioo; Sat, 28 May 2022 11:13:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxXvBpoEcuJHLl9zvUwkjBWI7+WMTaFP9kvWsh854NXNpwJfHgD5Dp6h4zDSFc+2jviuqgv X-Received: by 2002:a17:903:1c3:b0:163:655c:c8cb with SMTP id e3-20020a17090301c300b00163655cc8cbmr16616393plh.76.1653761615500; Sat, 28 May 2022 11:13:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653761615; cv=none; d=google.com; s=arc-20160816; b=zz8TvmXxRTQ3zvfB7VIu6AxUJDaToyRvIQklG5vG2umy/Z+gfXgfT8dj74U81F8lNb e5ondJDaCqWA70QGEH9z9jjRNOWVDpaiTbA9YiLR+VNlxN3FYEUAh8mxcwXvOg9rig/X eAjcUgMismM3p918MGPm11f+IrwptS475b7uX+CTu4Z1NJmuTcZHc+UbZw9PQlUXvY63 dvCPbjJrjOgSGVF34ZDwYhj38N+/Lwkyy+YcN6UhruBSNUbFUtpPwVEDyoz1klPwLTLw Bnf78hAOBu60dI6ckDt7DeZvnRL7Ceti/k6AXxQ5eScmyhET05JlfcYWP9g8NH2fJ+SO qBzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=phqfNrEIjHjcmSy2NtJdwNwEt4kQ6Q/HthoJupOyo3o=; b=gJbPItIU2XJcdSlkcAnoGbpi9giP1jFNhl4K5eBO0v011nOUjCxHZAToKhZKyXv5p3 rYZjpDXx4Yg1K/OeVCasPXQEdN1Zsz/O4Rbahwz0lpNn0v0D+hnt+EzIkjI2xZxEcKds ECei4X3qgNh3U4jrv27XSHy7WqQ1GFZLNNJCkLIf1U+FqZGHXmLx9hP0hHZHYyDddww3 9/V0KIPgFJz6mJ6bDZ1Q29nvkqbuySW/6dmEcQXrWFv2a+ugdxZZCb4CuPBM+l9WevDH x7F2+gPUMpuKcgHxbFflykLlJ05VXBb+A9GYJSyj8C+BVQfqqDR9qPnTNkL9ZzHK5I+S mfYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=nGIlC3xj; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id a34-20020a631a22000000b003fa7e315240si10386186pga.249.2022.05.28.11.13.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 May 2022 11:13:35 -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; dkim=pass header.i=@suse.com header.s=susede1 header.b=nGIlC3xj; 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; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B14D6DF15; Sat, 28 May 2022 11:13:33 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344749AbiEZMJe (ORCPT + 99 others); Thu, 26 May 2022 08:09:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344593AbiEZMJc (ORCPT ); Thu, 26 May 2022 08:09:32 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB2A7D4117 for ; Thu, 26 May 2022 05:09:30 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id AA118219D8; Thu, 26 May 2022 12:09:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1653566969; h=from:from:reply-to: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=phqfNrEIjHjcmSy2NtJdwNwEt4kQ6Q/HthoJupOyo3o=; b=nGIlC3xjdQ4uVkeIdZumF59Kw2oHOppe2WhsanwD3ow0nZNY7e2nneWdExM0b3unwVsecT tm5k2Doh7ookLckQRrKgtA8pNJGJaWSDNCmgUwhLBjI/YhNSXdQL5g2fZciNeY4uh4hK07 9rFduEtTi+sgfW3Kjn3BpwCiyg9CPFg= Received: from suse.cz (unknown [10.100.201.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 1B7C82C141; Thu, 26 May 2022 12:09:29 +0000 (UTC) Date: Thu, 26 May 2022 14:09:25 +0200 From: Petr Mladek To: John Ogness Cc: Linus Torvalds , Sergey Senozhatsky , Steven Rostedt , Andy Shevchenko , Rasmus Villemoes , Jan Kara , Peter Zijlstra , Linux Kernel Mailing List Subject: Re: [GIT PULL] printk for 5.19 Message-ID: References: <87pmk1tgmx.fsf@jogness.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87pmk1tgmx.fsf@jogness.linutronix.de> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 2022-05-26 00:08:46, John Ogness wrote: > On 2022-05-25, Linus Torvalds wrote: > > On Mon, May 23, 2022 at 6:21 AM Petr Mladek wrote: > >> There are situations when the kthreads are either not available or > >> not reliable, for example, early boot, suspend, or panic. In these > >> situations, printk() uses the legacy mode and tries to handle > >> consoles immediately. > > > > Looking through the commits, I don't see how that "printk: wake up all > > waiters" makes any sense at all. > > > > It *ALREADY* woke up all waiters as far as I can see. > > > > Doing a wake_up_interruptible() will stop waking things up only when > > it hits a *exclusive* waiter, and as far as I can tell, there are no > > exclusive waiters there. > > You are correct. @log_wait never has exclusive waiters. I will post a > patch to revert the change in question. John, Yes, please do so. > > But when I see something really core like printk() get confused and > > mis-understand basic wait queue behavior, that makes me go "This is > > WRONG". Linus, thanks a lot for catching and explaining the problem. Yeah, it is a shame. I have met code with exclusive waiters only once, 8 years ago and completely forgot about it. I was curious how it worked with more log waiters but I put it into TODO list. The new code looked safe and I was too focused on finding potential problems. Best Regards, Petr