Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp5780938imb; Fri, 8 Mar 2019 02:05:30 -0800 (PST) X-Google-Smtp-Source: APXvYqxVjHcKe78baYanoJBWjYEK8XPSm/eD5c4Ba6QYvtcQnoXPYLx1HxdWHfegZfnP2LYXlUdo X-Received: by 2002:a17:902:f095:: with SMTP id go21mr17447826plb.199.1552039530334; Fri, 08 Mar 2019 02:05:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1552039530; cv=none; d=google.com; s=arc-20160816; b=xEE0sOxJPI2mCVDO/3qW/jF3tyUROrz1isgprxPiXwoGyUayLWgSrxxP/vgablOJWA 3DG511pkmd1odv6lhmNtK2IE3ElWdBg4kUU/L4y/IrEFJ6VPrPFi1yeVg6j/YIkcNTNh hcNr/OZ+QxM845uSsI0f/e0CcnedFnX5QMLiFAka0kzuXIfI3Dt0LC0MlQ2bjo3NwRwf g7vkUsBFiqa+1MF2bcIntUFqrHJbRigyoXUzzTBRo+c3BNoLLN70nFY4Jj0e03/zLp6F aTGnc4mCOJp17VuycegovemGSqs4skou/hXb7xNzv+7nPmvsUszv34Zi/TDCkI+XGw+D Bfdw== 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=exS5Wi1UGJ0htePG4bMQdtDycRah3/hnJC3OjnPzOcs=; b=kwqmhqUvTIivo9eCIr6HJg8rahPuz5j3CEQHxMrb4ttuNwrs/R64RT9OgyGjhFyaCU WSfBrE4mJPH4pDeu7P78geAyMf/V8qGb3Kusk3UTLGD5cuYRALs7U37FAGqAC6gIOJsZ S6aK2y6J5ofYHxhZ1Y7I8WVeavKsget4i7iQ+7V54Gr8foPZ9otoHbAgpf71/Rw4eUGh DJwlKVw5B52sp1XDNHvuiu594irR7u0b0yGh8mBLU6QQTj2/GrQOPLEFQkar1+EECJ0m 5/VnxmAOy/jm4b+g/lShqIdTQIUWOE416fLnMxK+1ONDtP2QeqAOzH6vO3hdSH9gZGUG YNdQ== 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 b27si5921701pgb.366.2019.03.08.02.05.14; Fri, 08 Mar 2019 02:05:30 -0800 (PST) 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 S1726285AbfCHKEy (ORCPT + 99 others); Fri, 8 Mar 2019 05:04:54 -0500 Received: from mx2.suse.de ([195.135.220.15]:55084 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725789AbfCHKEx (ORCPT ); Fri, 8 Mar 2019 05:04:53 -0500 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 67407AD4C; Fri, 8 Mar 2019 10:04:52 +0000 (UTC) Date: Fri, 8 Mar 2019 11:04:49 +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 08/25] printk: add ring buffer and kthread Message-ID: <20190308100449.dccctqo6i4xa6bhq@pathway.suse.cz> References: <20190212143003.48446-1-john.ogness@linutronix.de> <20190212143003.48446-9-john.ogness@linutronix.de> <20190304073856.GA552@jagdpanzerIV> <87va0uopmd.fsf@linutronix.de> <20190308013134.GB4063@jagdpanzerIV> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190308013134.GB4063@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 Fri 2019-03-08 10:31:34, Sergey Senozhatsky wrote: > On (03/07/19 13:06), John Ogness wrote: > > On 2019-03-04, Sergey Senozhatsky wrote: > > > This, theoretically, creates a whole new world of possibilities for > > > console drivers. Now they can do GFP_KERNEL allocations and stall > > > printk_kthread during OOM; or they can explicitly reschedule from > > > ->write() callback (via console_conditional_schedule()) because > > > console_lock() sets console_may_schedule. > > > This can stall the entire printing pipeline > > OOM -> printk_kthread() -> console_lock() -> con_foo() -> kmalloc(GFP_KERNEL) -> OOM > > > Although, as I mentioned in a previous response[0], perhaps we should > > not loosen the requirements on write(). > > Right. Console drivers better stay restricted; very restricted. I agree here. > > It is exactly that disable_preempt() that is so harmful for realtime tasks. > I'll reply in another email (later today, or tomorrow). I see. But I have troubles to imagine a preemtible direct console output. The result would be mixed messages on a single line. Best Regards, Petr