From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755311AbcGLP7Y (ORCPT ); Tue, 12 Jul 2016 11:59:24 -0400 Received: from mx2.suse.de ([195.135.220.15]:59905 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752657AbcGLP7W (ORCPT ); Tue, 12 Jul 2016 11:59:22 -0400 Date: Tue, 12 Jul 2016 17:59:18 +0200 From: Petr Mladek To: Viresh Kumar Cc: Sergey Senozhatsky , Andrew Morton , Jan Kara , Tejun Heo , Tetsuo Handa , "linux-kernel@vger.kernel.org" , Byungchul Park , Sergey Senozhatsky Subject: Re: [PATCH v12 0/3] printk: Make printk() completely async Message-ID: <20160712155918.GC8597@pathway.suse.cz> References: <20160513131848.2087-1-sergey.senozhatsky@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 2016-07-11 12:25:11, Viresh Kumar wrote: > On Fri, May 13, 2016 at 6:18 AM, Sergey Senozhatsky > wrote: > > Hello, > > > > no code changes, just refreshing the series so it'll be easier to > > pick up. added Reviwed-by-s and corrected a typo spotted by Petr. > > > > This patch permits to change printk() to operate in completely > > asynchronous mode: new messages are getting upended to the kernel > > printk buffer, but instead of 'direct' printing the actual print > > job is performed by a dedicated kthread. This has the advantage > > that printing always happens from a schedulable context and thus > > we don't lockup any particular CPU or even interrupts. > > > > against next-20160513 > > > > > > v12: > > -- rename printk_kthread_can_run bool flag > > -- update printk_kthread_can_run comment (Petr) > > -- drop mutex from printk_sync_set(), sysfs writes are synchronised (Petr) > > We were also screwed because of the problem this thread is trying to solve, > which I posted last week [1]. > > And then I found this thread which fixed my issue, thanks a lot guys :) > > Tested-by: Viresh Kumar > > Though, I would also like to mention one unwanted thing that happened on > my setup :) > > [ 12.874909] sched: RT throttling activated for rt_rq ffffffc0ac13fcd0 (cpu 0) > [ 12.874909] potential CPU hogs: > [ 12.874909] printk (292) > > On my system, the excessive printing happens during suspend/resume and this > happened after all the non-boot CPUs were offlined. So, only CPU 0 was left and > that was doing printing for a long time and so these errors :) > > It resulted in missing some print messages eventually as the scheduler probably > didn't schedule this thread for sometime after that. > > Will it be fine to get the priority of this kthread to a somewhat lower value, > etc ? I think that this patch helped only by chance. It causes that any message without a new line will force printk to the sync mode. Then it will print even the buffered messages immediately. It causes printk to behave more or less in the sync mode all the time. I am still scratching my head about the problem fixed by this patch and also about suspend problems. Best Regards, Petr