Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp2022288imc; Tue, 12 Mar 2019 05:39:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqwQe5dLABiZuMp7xg/+ovbcF2klgOVdHAGQNV74WDZZeI09h9eVmJzSYcqAs2vfeNX1d0l4 X-Received: by 2002:a62:110c:: with SMTP id z12mr38813300pfi.184.1552394396326; Tue, 12 Mar 2019 05:39:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552394396; cv=none; d=google.com; s=arc-20160816; b=WE6O1uPbC0EPEe1XYA98ITLrWf+RZL1zz+urBzPnCCHVY9W+zS0I/6Jaqeo6dTzu4l VhJfDXnl7xDzkIW2JAkpEpbUEgHScpksX6PuUZlt4vpEZMiWJ/V1aZzy7oPSPLlRLONN 1aGN9msusGWG1wox2tQsLGBkcTdcf/tKBxIk8AAW/AbV6pYv4DoX7udFbY9a629e3EKp o96wJzyVeV1/b/Ehlo/KsNSopagtxCkhjwHtCT0H3T3XroKPo+PVVkF0WJKCUkatykQm nc8xvIOHXMqYVK6Y/WOYDw+kvoiUygC1q9nkdsWEmPMb7QMDeeZ8EFTAr11j/sF10EQp /m3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=wm8Syz1Hpp/gteInTWvkp3IGTglNCCnicqtZrTgHhIw=; b=XOT90DgkEvnsrXUgsIWyjJjKJN3WAtgPz0ITSqvkgUkHKbsvTWMRDmA5iAgoIFRSd1 7ObzHF9OBlN01rfhocLoW149W5nJLLcYJibzjpfDqlm1/fel/SHBxslFSPC6QtfkP6Uo 7AgFVVVtOFFs2IdnwJNCG4hi0GKulhDEI1Aq+yT8Kh4rqSgaVNsaoPhaKl9n+VYHJLDv 1M4CxEVlND/guneACbeOph/hFkXh8ndbsAvxYjvKkq2qLMZ0xJtwJzWLVtZyjy3SgSwr m99c9b3Uq5NjfMY4iLauSVO33Umc8wJzezV8a6xmERWiwNaTSIXIm/Z4mDOULWL5WQH8 pSjw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y4si8722123plb.370.2019.03.12.05.39.39; Tue, 12 Mar 2019 05:39:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726365AbfCLMjB (ORCPT + 99 others); Tue, 12 Mar 2019 08:39:01 -0400 Received: from mx2.suse.de ([195.135.220.15]:39904 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725895AbfCLMjA (ORCPT ); Tue, 12 Mar 2019 08:39:00 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 3F052AF7B; Tue, 12 Mar 2019 12:38:59 +0000 (UTC) Date: Tue, 12 Mar 2019 13:38:57 +0100 From: Petr Mladek To: Sergey Senozhatsky Cc: John Ogness , linux-kernel@vger.kernel.org, Peter Zijlstra , Steven Rostedt , Daniel Wang , Andrew Morton , Linus Torvalds , Greg Kroah-Hartman , Alan Cox , Jiri Slaby , Peter Feiner , linux-serial@vger.kernel.org, Sergey Senozhatsky Subject: Re: [RFC PATCH v1 00/25] printk: new implementation Message-ID: <20190312123857.juatd6fwtfmqajze@pathway.suse.cz> References: <20190212143003.48446-1-john.ogness@linutronix.de> <20190213025520.GA5803@jagdpanzerIV> <874l9721hf.fsf@linutronix.de> <20190304052335.GA6648@jagdpanzerIV> <87lg1rggcz.fsf@linutronix.de> <20190311105411.GA368@jagdpanzerIV> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190311105411.GA368@jagdpanzerIV> User-Agent: NeoMutt/20170421 (1.8.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 2019-03-11 19:54:11, Sergey Senozhatsky wrote: > On (03/07/19 10:53), John Ogness wrote: > > Since all current console drivers are already irq safe, I'm > > wondering if using irq_work to handle the emergency printing for console > > drivers without write_atomic() would help. (If the printk caller is in a > > context that write() supports, then write() could be called directly.) > > This would also demand that the irq-safe requirements for write() are > > not relaxed. The printk-kthread might still be faster than irq_work, but > > it might increase reliability if an irq_work is triggered as an extra > > precaution. > > Hmm. OK. So one of the things with printk is that it's fully sequential. > We call console drivers one by one. Slow consoles can affect what appears > on the fast consoles; fast console have no impact on slow ones. > > call_console_drivers() > for_each_console(c) > c->write(c, text, text_len); > > So a list of (slow_serial serial netcon) console drivers is a camel train; > fast netcon is not fast anymore, and slow consoles sometimes are the reason > we have dropped messages. And if we drop messages we drop them for all > consoles, including fast netcon. Turning that sequential pipline into a > bunch of per-console kthreads/irq and letting fast consoles to be fast is > not a completely bad thing. Let's think more about this, I'd like to read > more opinions. Per-console kthread sounds interesting but there is the problem with reliability. I mean that kthread need not get scheduled. Some of these problems might get solved by the per-console loglevel patchset. Sigh, any feature might be useful in some situation. But we always have to consider the cost and the gain. I wonder how common is to actively use two consoles at the same time and what would be the motivation. Best Regards, Petr