Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751372AbeAPQGj (ORCPT + 1 other); Tue, 16 Jan 2018 11:06:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:45392 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750772AbeAPQGh (ORCPT ); Tue, 16 Jan 2018 11:06:37 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 28DE12176E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=goodmis.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=rostedt@goodmis.org Date: Tue, 16 Jan 2018 11:06:33 -0500 From: Steven Rostedt To: Sergey Senozhatsky Cc: Petr Mladek , Sergey Senozhatsky , Tejun Heo , 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: <20180116110633.56f48cf7@gandalf.local.home> In-Reply-To: <20180116061013.GA19801@jagdpanzerIV> References: <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> <20180113072834.GA1701@tigerII.localdomain> <20180115101743.qh5whicsn6hmac32@pathway.suse.cz> <20180115115013.cyeocszurvguc3xu@pathway.suse.cz> <20180116061013.GA19801@jagdpanzerIV> X-Mailer: Claws Mail 3.14.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Tue, 16 Jan 2018 15:10:13 +0900 Sergey Senozhatsky wrote: > overall that's very close to what I have in one of my private branches. > console_trylock_spinning() for some reason does not perform really > well on my made-up internal printk torture tests. it seems that I One thing I noticed in my test with the module that does printks on all cpus, was that the patch spreads out the processing of the consoles. Before my patch, one printk user would be doing all the work, and all the other printks only had to load their data into the logbuf then exit. The majority of printks took a few microseconds, which looks great if you ignore the one worker that is taking milliseconds to complete. After my patch, since a printk that comes in while another one was running would block, then it would start printing, it did lengthen the time for individual printks to finish. Worst case it would double the time to do printk. But it removed the burden of a single printk doing all the work for all new printks that came in. In other words, I would expect this to make printk on average slower. But no longer unlimited. -- Steve > have a much better stability (no lockups and so on) when I also let > printk_kthread to sleep on console_sem(). but I will look further.