Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2556575pxj; Mon, 10 May 2021 05:52:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwCp6A1EX9P1MPm+7Zg7rqUJcaDKswEePAqYiY41KNUfrbeKeuSqRBdnWmmPbEJDJx4xEkk X-Received: by 2002:a02:7f57:: with SMTP id r84mr22140311jac.108.1620651159129; Mon, 10 May 2021 05:52:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620651159; cv=none; d=google.com; s=arc-20160816; b=rntvjJSU1EpU7oG6FJvsha8HjJEaRdv1JggYLNYyXUymiXXQCY23SNAdSotkZC4lvw /r1O2nAg/mD6sQVwIhdi13inZP5Iee0IDUsuDxBtE2yrG8d1wwq5Npil9FBuIsme7Suj 12cSkTCYCWMvn9ldNOgqLeo6S5ulwvN1QHtfzc4+AJYHK1gpidp+lg3ZufpyY1XnbZsk w02v4tKZyWd7XnuJFQwuDi0+qhDcNwESU2SKBWXvVZ9xT9UEK+8WeSwtiYtG6KFPuWg9 yQkxhuQ7zlY4II0m2595AOyl15/43ZMDCG1kcKX2gQZx0jAXJJQTuAV1AIlkJlNrnNF2 xzng== 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=kZxLubrmtkSSGN/7OtV4HwrFaM1RJo3wj918s02beZQ=; b=i4Fb6ccKgpZlOVK1B2FnxBbFwuiamidihbVDLyzXoD6ExZp9xwDEa3JTHnscfksea0 cVeC/U7sY7ZMt955FSRm94h1Phy6wCO0T2kvy0nOv5FPFDrxrz0vt87vIawfpV/xP6FO XiMV7Oosbm+2Pqa9udu+3eYMxbNdoEd03y1WNOkWnRfEk+H0K9lL/sL8VH69wmoHo0Lt VGBByGb6dKmzhhW48mQJstRT7JXRqkIzMln42VcmUasVLrZcpsfFQMxXxVWX+wsQQq9I p2jLkAfsZhPw4Fz421KO7sREZ51NQ+/8f/DD9KrD7zOkmL12SLcAxSnipOSvdm5xID6E GqGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=YTzrULu+; 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=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o4si15643592jas.4.2021.05.10.05.52.26; Mon, 10 May 2021 05:52:39 -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=pass header.i=@chromium.org header.s=google header.b=YTzrULu+; 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=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349636AbhEJMtt (ORCPT + 99 others); Mon, 10 May 2021 08:49:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243214AbhEJLsT (ORCPT ); Mon, 10 May 2021 07:48:19 -0400 Received: from mail-pj1-x1033.google.com (mail-pj1-x1033.google.com [IPv6:2607:f8b0:4864:20::1033]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 348C2C061377 for ; Mon, 10 May 2021 04:43:23 -0700 (PDT) Received: by mail-pj1-x1033.google.com with SMTP id md17so9591992pjb.0 for ; Mon, 10 May 2021 04:43:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=kZxLubrmtkSSGN/7OtV4HwrFaM1RJo3wj918s02beZQ=; b=YTzrULu+sL5wvlatHOauzFa1/mBVLpmasj2zRDFPcaSmcIFGtcaQLdDPtdb2JLGAfN yT3avmcRAoiS8PteXDIJK0kMfGFtbpbz9qMCapQ3uMAXwVwFNEgd9TJ7q7iA5jdnixEb 1X0pENoiBzh8DXEysspfiiX0OeBPYURtdvY5U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=kZxLubrmtkSSGN/7OtV4HwrFaM1RJo3wj918s02beZQ=; b=HtsIKHSLnnSKSIsDM+IuuDvK89T2ksi2dEb7TDsacZMkHFK78PXk+cHGMIMI8T7/Rg IDc69M3f7qS00WoOPaS1CtOq9uXl71qt5m0/07kEQRThTufxTzLUGaa8cJDloN8aFDXz 4FszgkROvW8GO/EhOoFwaSWvOyqO1lEiiDA63ca3EXyjsUi43Ta812E0t3is08gdKIoc lIEkiPsVMOj3AejHKxNkhM7csc3eJoy4NY54Z+w0Au8SJaCsOFNzb2oGsWJ3Ag3aQcE2 dwwiGyPoiN+NVN45x0ComGTsQja93cNKLNy7oVqPC44ib+J04gbXCrJ4NX7VfxLteIca Lp4Q== X-Gm-Message-State: AOAM533UPzQXI85h3v+dOE6QCe/AobVH2dV9XxDa9SXT3IkLSODcxL4n zHMpOssKkpFnziJkJ6Br3xpTdw== X-Received: by 2002:a17:90b:505:: with SMTP id r5mr27248407pjz.121.1620647002797; Mon, 10 May 2021 04:43:22 -0700 (PDT) Received: from google.com ([2409:10:2e40:5100:b1d:8aee:8284:2f76]) by smtp.gmail.com with ESMTPSA id b23sm11153446pjo.26.2021.05.10.04.43.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 May 2021 04:43:22 -0700 (PDT) Date: Mon, 10 May 2021 20:43:16 +0900 From: Sergey Senozhatsky To: Petr Mladek Cc: Sergey Senozhatsky , Luo Jiaxing , sergey.senozhatsky@gmail.com, rostedt@goodmis.org, john.ogness@linutronix.de, linux-kernel@vger.kernel.org, linuxarm@huawei.com, bobo.shaobowang@huawei.com Subject: Re: [PATCH] printk: stop spining waiter when console resume to flush prb Message-ID: References: <1620288026-5373-1-git-send-email-luojiaxing@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (21/05/10 12:17), Petr Mladek wrote: > > rcu_read_lock(); > > ... > > console_unlock_preemptible(); > > ... > > rcu_read_unlock(); > > > > lockdep_assert_preemption_enabled() is not entirely reliable - it > > depends on __lockdep_enabled, provided that system in question has > > CONFIG_PROVE_LOCKING set. > > I understand the concern. I think that I would be able to sleep with > this. I believe that such problems would be discovered soon. > > Also I doubt that it would spread that quickly. It is the same as > with printk_deferred(). It is just a workaround for a problem > that only few people are aware of. > > If it is still a concern, we could make it static and block > any patches that would make it public. > > But it does not make sense to fight over this now. Is any attempt to have alternative fixup solutions and discussions is going to be labeled as a fight? Up to you, I'm personally not having any fights. > I am not sure that console_unlock_preemptible() is worth it after all. > Luo has to prove that it might fix a real life problem. Good point. > I am sorry but I am not going to continue in this discussion. [..] > The current plan is to move console work to kthreads (separate > preemptive context). Using IRQ is a complete opposite way. I'm not objecting future directions. I'm discussing current fixup proposals. And I'm not very super comfortable with the approach that introduces dynamic duality to printk behaviour: new printk behaviour or the old one, and that API is system wide available. That IRQ thing is not beautiful, bit it's already there and it's working and we now how it behaves. That's it.