Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754838AbeAMHbG (ORCPT + 1 other); Sat, 13 Jan 2018 02:31:06 -0500 Received: from mail-pl0-f42.google.com ([209.85.160.42]:45515 "EHLO mail-pl0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751163AbeAMHbE (ORCPT ); Sat, 13 Jan 2018 02:31:04 -0500 X-Google-Smtp-Source: ACJfBovbdms97GlmZ0FueIx9oG9HLgmHL7hJOocsyL9ALbVr8HGQqHy3exZ2hYyhDCuDT1lueL6DSw== Date: Sat, 13 Jan 2018 16:31:00 +0900 From: Sergey Senozhatsky To: Petr Mladek Cc: Steven Rostedt , Sergey Senozhatsky , Tejun Heo , 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: <20180113073100.GB1701@tigerII.localdomain> References: <20180110130517.6ff91716@vmware.local.home> <20180111045817.GA494@jagdpanzerIV> <20180111093435.GA24497@linux.suse> <20180111103845.GB477@jagdpanzerIV> <20180111112908.50de440a@vmware.local.home> <20180112025612.GB6419@jagdpanzerIV> <20180111222140.7fd89d52@gandalf.local.home> <20180112100544.GA441@jagdpanzerIV> <20180112072123.33bb567d@gandalf.local.home> <20180112125536.GC24497@linux.suse> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180112125536.GC24497@linux.suse> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On (01/12/18 13:55), Petr Mladek wrote: [..] > > I'm not fixing console_unlock(), I'm fixing printk(). BTW, all my > > kernels are CONFIG_PREEMPT (I'm a RT guy), my mind thinks more about > > PREEMPT kernels than !PREEMPT ones. > > I would say that the patch improves also console_unlock() but only in > non-preemttive context. > > By other words, it makes console_unlock() finite in preemptible context > (limited by buffer size). It might still be unlimited in > non-preemtible context. could you elaborate a bit? [..] > > > reverting 6b97a20d3a7909daa06625d4440c2c52d7bf08d7 may be the right > > > thing after all. > > > > I would analyze that more before doing so. Because with my patch, I > > think we make those that can do long prints (without triggering a > > watchdog), the ones most likely doing the long prints. > > IMHO, it might make sense because it would help to see the messages > faster. But I would prefer to handle this separately because it > might also increase the risk of softlockups. Therefore it might > cause regressions. > > We should also take into account the commit 8d91f8b15361dfb438ab6 > ("printk: do cond_resched() between lines while outputting to > consoles"). It has the same effect for console_lock() callers. I replied in another email. -ss