Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2561067pxj; Mon, 10 May 2021 05:59:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKfF5UWYKVx2nJcXc0v95FP7IoVQB6RHyiE8wajGLtvIrpS/Q0MrM4r/SWwU54GZo2955r X-Received: by 2002:a5d:8e08:: with SMTP id e8mr18118564iod.47.1620651565519; Mon, 10 May 2021 05:59:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620651565; cv=none; d=google.com; s=arc-20160816; b=X4J/4a3LecPzWqDnO+xCzNXVP3N5n3RTrbFlmI6czHTMEkMqrwp0vcGt0LpmVKiQ62 /IpmTLeVlyDAo+gH/kBDFkPCRcE7wmIIlZ5K7SR4z2t4Hjcx3/Iha1GQ5Vi+4vvVblkO 9AWK4vY1vBVH8yk/Ne7/edNNPhgqOrAlxMvXJeAGXHszwW6I7MsvI1+u9/PWDnFEYHtL D5pRv/k2WWOXeQBX0TA3f/Qfmanu/hMAh5SqbukZZRaEB+XWFwEd9/94vm5WI8nzbcr2 6yMQmxki22bp9V2ec7aBwTNkBGtUo1OCBpcWcQnjU1w2RKv27VWBzmfEyXtdEDrjGnrp KXqg== 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=PTR4dBkNFBCJ7q1RjCjO2bl1wxVL8tAhBVKYkSFF/gk=; b=PKLvv92uniQJwEhuXxSL85aTHBYbTWpM+cUhAGq8AwAVwdeb08Yb1T0w7h1SJUsiPg uPAPK6G4sRpY6HoufFTxM73N+94mf3WS9AGFzl+gsz8MAhu+Ry4ez62vHfOGVG9HKueG kyE+h+eeKgJrDbUD0X80vzId1DUPUGcmoU0WJs7eM50kKOkeeS7F2gRitDPSeYUuyEWM 52+qA3Ct7S1ckfBx6ns6vch7oiFyikYt4dBITwWk07clQicq71oY7XV5JKQQbF2W3NuS NpuD+9c45623UG8OZiWpLAiubsYyT821L0wBF4lu1zhovOfA2LkJlj3RXX9AH89Y6EuP W0Kw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=O3jcwqfm; 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 q16si16406228iow.52.2021.05.10.05.58.30; Mon, 10 May 2021 05:59:25 -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=O3jcwqfm; 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 S239703AbhEJMwJ (ORCPT + 99 others); Mon, 10 May 2021 08:52:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343497AbhEJMNp (ORCPT ); Mon, 10 May 2021 08:13:45 -0400 Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 353E5C0611AC for ; Mon, 10 May 2021 05:06:15 -0700 (PDT) Received: by mail-pg1-x52d.google.com with SMTP id q15so8890773pgg.12 for ; Mon, 10 May 2021 05:06:15 -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=PTR4dBkNFBCJ7q1RjCjO2bl1wxVL8tAhBVKYkSFF/gk=; b=O3jcwqfmGMEjWuO+My7tQegTIjW5LTammV9l2g6BXHdojoV+bbCdqpSQF5K8Fp/DLU 9mRkNI59Tqysx8YyihQJdMURooh8i1jB0p/oihyAllVHu4uolRbHlkysHf3R+/okOG1J ey+W603teOFrvkM9YS/Y6H/rC22KNHVK1hQ5Q= 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=PTR4dBkNFBCJ7q1RjCjO2bl1wxVL8tAhBVKYkSFF/gk=; b=h/tuWE30ZeFFMOkWN0R84b6qPal1OTe+KqRj9kQaXIQrlJ5MC6z4RpbVeI7dlYi+UQ QK1G6015s2YUTk9V/KifSVUyi7GxfnoGOdyRqsNIplrQ2xf7b0lKRhXfnystLxoMIJdK KBN0g196vmuXcxKZhWrDhJGopuGy53agqtvCwxt+VlQpcWqJNZr01Qyc8MMaY5twF/0U fj99qI2kYcvvlNhg6bykrUS/1siBNU37QnLwsy64T0nH8wcjTWH61QbPnX4wZ+SPF5HN 0zokzFuXgc4dRZlEGnTzkEiL8OHuC3CXt2unFHK6DY+h1cngniB3cLda/uh5LbUDBrRR /vpQ== X-Gm-Message-State: AOAM5300QTmZ3q0Bsqf3AeGYanc1wGCbHZN9mfxvwhQurRRGQ0xhLcuH fXALhY76zzdQu20oGEzIYUji/w== X-Received: by 2002:a63:aa48:: with SMTP id x8mr1238179pgo.359.1620648375232; Mon, 10 May 2021 05:06:15 -0700 (PDT) Received: from google.com ([2409:10:2e40:5100:b1d:8aee:8284:2f76]) by smtp.gmail.com with ESMTPSA id d16sm11392910pgk.34.2021.05.10.05.06.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 May 2021 05:06:14 -0700 (PDT) Date: Mon, 10 May 2021 21:06:09 +0900 From: Sergey Senozhatsky To: Petr Mladek Cc: luojiaxing , Sergey Senozhatsky , 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> <46df3838-e1a6-ee95-b398-bef0896d2b03@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 11:50), Petr Mladek wrote: [..] > The only problem is that it becomes the console_owner too late. > It spends long time by flushing the accumulated messages. But > they are its own messages after all. > > The only real solution is to pass the console work to a separate > kthread and do not block any printk() caller. Yeah, but even that thing is getting complex fairly quickly. wake_up_process() queues kthread on the same CPU, so if the printk() (ab)-user is in atomic context then printing kthread won't get scheduled.