Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4590906pxk; Wed, 30 Sep 2020 07:01:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwajc0gTYEK1honki3qeVPMq2rLuu14JqxIns/45lAREhFSpg/YUqleIdQVZYPdpQwxt0vD X-Received: by 2002:a05:6402:1212:: with SMTP id c18mr2827134edw.344.1601474480443; Wed, 30 Sep 2020 07:01:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601474480; cv=none; d=google.com; s=arc-20160816; b=nJMDI8IygaFDOeb9Nf3KnTztFqLmHT//1Ybd96gRK1hIUkZsd35Cv9ULjlYT5vI0Lm WorshHOq3UrvTqbWLUq9ulcnDArdf3bKI1qjU/dDbS3krufnnAn4M2bh4LqAj7Y+mfr2 CPLW3CJ651v3GEj81wzGoH+StSz696C7IEAfDCQtIYHuXV/ew5Eh7II9safaq5+GOS5d iAhMitCGbzmsOHlaRuqxH8FJbzw98h41KmtAFupZ30vRzBvphJHk31Rndy52ZrKoacUH 8y1S9SarAiGRaT4uV/+fW9EHUjCc1KoDEJVXKMiWlVo0iXJJ3V5hkFvoOH1i/AaghS79 nbyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=60/DuYzuTuu/RoGHpnTicjya4jLSFnDAPXQjHEwUDFQ=; b=U9jj9RChK32kxIcFJS+BA3/GycSddkurH24QfHukn13AskXy9hytzjdWGxe6iypogI zmwipI8xX3+IVHwUPgpsqQ7tAJfwN6BblRyEwF3rZzSDqcLSiKtNHBxOwMKYlxSPTlM/ BXY51CAb7m7e0aDZMNhFvJzCr6BGrm0qYh40iYHIIEB3K6Sdqjik202jKNuLp/I57xjz YTtXxApOwpO3/dAzVdzM5HHH7IJUJ6Jyqs8EIVAgLgBSD/++yHChuM+Npv9WK3Hbps2k BRXI2/1SYiKVtX2t0d9kasQy+G4vDdkpq/sxayOaxbsV9XHCix9MwaI/51lzRWZmejrv ttxw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=YtfW45Qd; 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=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h7si1252176ejc.55.2020.09.30.07.00.53; Wed, 30 Sep 2020 07:01:20 -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=@suse.com header.s=susede1 header.b=YtfW45Qd; 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=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730188AbgI3N5V (ORCPT + 99 others); Wed, 30 Sep 2020 09:57:21 -0400 Received: from mx2.suse.de ([195.135.220.15]:60312 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730304AbgI3N5V (ORCPT ); Wed, 30 Sep 2020 09:57:21 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1601474239; h=from:from:reply-to:subject:subject: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=60/DuYzuTuu/RoGHpnTicjya4jLSFnDAPXQjHEwUDFQ=; b=YtfW45QdidqHBbd17iP9wT7uGPvIRxr/c0yC65aXrvoGRW7/BD7fVlpWy2HKlodtox1A7F z5LGkoyKJm8mWG7Ah5ML4FZ7XnA9SUAvddM1zO1a4uVEgqZiPYCowhrZkf0Fwo6QCOehcB gN+JEBVRMTsK/G6Mz0hlb8/qlrkW6vc= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 82DDDAC8B; Wed, 30 Sep 2020 13:57:19 +0000 (UTC) Date: Wed, 30 Sep 2020 15:57:18 +0200 From: Petr Mladek To: Prasad Sodagudi Cc: rostedt@goodmis.org, sergey.senozhatsky@gmail.com, gregkh@linuxfoundation.org, tglx@linutronix.de, linux-kernel@vger.kernel.org, tkjos@google.com, Mohammed Khajapasha Subject: Re: [PATCH 2/2] printk: Make the console flush configurable in hotplug path Message-ID: <20200930135718.GI29288@alley> References: <1600906112-126722-1-git-send-email-psodagud@codeaurora.org> <1600906112-126722-2-git-send-email-psodagud@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1600906112-126722-2-git-send-email-psodagud@codeaurora.org> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 2020-09-23 17:08:32, Prasad Sodagudi wrote: > From: Mohammed Khajapasha > > The thread which initiates the hot plug can get scheduled > out, while trying to acquire the console lock, > thus increasing the hot plug latency. This option > allows to selectively disable the console flush and > in turn reduce the hot plug latency. > > diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c > index 9b75f6b..f02d3ef 100644 > --- a/kernel/printk/printk.c > +++ b/kernel/printk/printk.c > @@ -2996,13 +3000,15 @@ static int __init printk_late_init(void) > unregister_console(con); > } > } > +#ifdef CONFIG_CONSOLE_FLUSH_ON_HOTPLUG > ret = cpuhp_setup_state_nocalls(CPUHP_PRINTK_DEAD, "printk:dead", NULL, > console_cpu_notify); > WARN_ON(ret < 0); > ret = cpuhp_setup_state_nocalls(CPUHP_AP_ONLINE_DYN, "printk:online", > console_cpu_notify, NULL); > WARN_ON(ret < 0); > - return 0; > +#endif > + return ret; Just a comment from the printk-side view. This change is wrong, definitely. The above calls are needed with the current printk() design. They make sure that someone would actually push the messages to the console. Otherwise they might stay hidden seconds/minutes/hour/days until another random printk() does the job. They will not be needed with the ongoing printk rework[1] where the consoles will get handled by a dedicated kthread. [1] https://lore.kernel.org/lkml/87k1acz5rx.fsf@linutronix.de/ Best Regards, Petr