Received: by 10.223.148.5 with SMTP id 5csp7306676wrq; Thu, 18 Jan 2018 03:57:52 -0800 (PST) X-Google-Smtp-Source: ACJfBouNdoe2eyzWxxbHog7p+tsUq/DKLF5fDV3MlFUgu4qkqdysVW+1QZY0CQVwOC2VQdY0MpgD X-Received: by 10.84.130.100 with SMTP id 91mr45160896plc.185.1516276672374; Thu, 18 Jan 2018 03:57:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516276672; cv=none; d=google.com; s=arc-20160816; b=JeQfM5OfKbPUcvSQKlCmazqjVtZbKPzMUKBxMDFeEOur4Ehq2qfy3oOHI/6aJMSDc1 1EJhxr76dSR44ABKKVtFA+uEwePaacMBfG2OmGZnRN+hJfY0bjHaMET95a/fHcsDEwlV jtrpa+qBsiQHjZYZecc3cdUAPCaHC1PkLV0lReWNeGaxWmp8Kt8XPliW06DGuGmlRNaE 7QqKK+ae4eo1mfOOoer00oWvr4x7MDZMYWdKP814/frV7btZy08w8C1XKQ1PKirD03yp To3wVeuS7sbM9fgCPd0TbV1UmUTEjyzcTumBU6V8dZegFKELQb2Rm8MphtAWUZgzPWys PwrA== 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:arc-authentication-results; bh=csN5i2CBqFICiQY0XVb6cC/My8IAEwNSuENxfsoN7I4=; b=j3xt/oM7Moqi4ssWjJFMoHbY8hXqA9GOVfzo547bxwzA3rOtaNXe4gemNBBafPsPUb Vskj8omTKMltR+W4YHn1Vds3K2bsX3CR6ZB81metBrLU3SvcnDHL+q9jbQHQOl560PlM Kytvkwk/aMXhtF7VMB+SF0eqRigYazDTA0XSNeDfGSIP24zgYLouinemVZYcgs7tYkuL K9Q2U3doCuMbgKHtgr7IHDMxegWCQyhEWXFXBfMX4+Ds0HlnSj/+B5peMW8/CDW50A3B T5yCJE6R1CN/WqWjTsdiUFWjuwGgRq9STABO1crYga3Rx8cw6cfol8M3v7+jGJQv8Jf4 Xu/w== 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 e190si6526450pfe.96.2018.01.18.03.57.38; Thu, 18 Jan 2018 03:57:52 -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 S1755875AbeARLvl (ORCPT + 99 others); Thu, 18 Jan 2018 06:51:41 -0500 Received: from mx2.suse.de ([195.135.220.15]:36732 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754819AbeARLvj (ORCPT ); Thu, 18 Jan 2018 06:51:39 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 65026ACDC; Thu, 18 Jan 2018 11:51:35 +0000 (UTC) Date: Thu, 18 Jan 2018 12:51:30 +0100 From: Petr Mladek To: Tejun Heo Cc: Steven Rostedt , Sergey Senozhatsky , Sergey Senozhatsky , akpm@linux-foundation.org, linux-mm@kvack.org, Cong Wang , Dave Hansen , Johannes Weiner , Mel Gorman , Michal Hocko , Vlastimil Babka , Peter Zijlstra , Linus Torvalds , Jan Kara , Mathieu Desnoyers , Tetsuo Handa , rostedt@home.goodmis.org, Byungchul Park , Pavel Machek , linux-kernel@vger.kernel.org Subject: Re: [PATCH v5 0/2] printk: Console owner and waiter logic cleanup Message-ID: <20180118115130.eomcbftg4qvmrui7@pathway.suse.cz> References: <20180111093435.GA24497@linux.suse> <20180111103845.GB477@jagdpanzerIV> <20180111112908.50de440a@vmware.local.home> <20180111203057.5b1a8f8f@gandalf.local.home> <20180111215547.2f66a23a@gandalf.local.home> <20180116194456.GS3460072@devbig577.frc2.facebook.com> <20180117091208.ezvuhumnsarz5thh@pathway.suse.cz> <20180117151509.GT3460072@devbig577.frc2.facebook.com> <20180117121251.7283a56e@gandalf.local.home> <20180117200551.GW3460072@devbig577.frc2.facebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180117200551.GW3460072@devbig577.frc2.facebook.com> 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 Wed 2018-01-17 12:05:51, Tejun Heo wrote: > Hello, Steven. > > On Wed, Jan 17, 2018 at 12:12:51PM -0500, Steven Rostedt wrote: > > From what I gathered, you said an OOM would trigger, and then the > > network console would not be able to allocate memory and it would > > trigger a printk too, and cause an infinite amount of printks. > > Yeah, it falls into back-and-forth loop between the OOM code and > netconsole path. > > > This could very well be a great place to force offloading. If a printk > > is called from within a printk, at the same context (normal, softirq, > > irq or NMI), then we should trigger the offloading. > > I was thinking more of a timeout based approach (ie. if stuck for > longer than X or X messages, offload), but if local feedback loop is > the only thing we're missing after your improvements, detecting that > specific condition definitely works and is likely a better approach in > terms of message delivery guarantee. I think that we could combine both. The recursion can be detected rather easily and immediately so there is no reason to wait. Once we have the code for offloading from recursion then we could kick_offload_thread() also from other reasons, e.g. when console_unlock() takes too long. I think that Sergey is already playing with this. It seems that we all could be happy in the end. Best Regards, Petr PS: I am sorry for the answer yesterday. Tejun's mail did not mention any details about the problem. I evidently forgot them. I have OOM and printk issues associated with Tetsuo. So I messed it. Believe me. It is a big relief to realize that we are not in the cycle again.