From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752059AbdF3OJ4 (ORCPT ); Fri, 30 Jun 2017 10:09:56 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:35905 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751666AbdF3OJy (ORCPT ); Fri, 30 Jun 2017 10:09:54 -0400 Date: Fri, 30 Jun 2017 23:10:01 +0900 From: Sergey Senozhatsky To: Petr Mladek Cc: Sergey Senozhatsky , Sergey Senozhatsky , Steven Rostedt , Jan Kara , Andrew Morton , Peter Zijlstra , "Rafael J . Wysocki" , Eric Biederman , Greg Kroah-Hartman , Jiri Slaby , Pavel Machek , Andreas Mohr , Tetsuo Handa , linux-kernel@vger.kernel.org Subject: Re: [RFC][PATCHv3 2/5] printk: introduce printing kernel thread Message-ID: <20170630141001.GE792@jagdpanzerIV.localdomain> References: <20170509082859.854-1-sergey.senozhatsky@gmail.com> <20170509082859.854-3-sergey.senozhatsky@gmail.com> <20170510055935.GA1966@jagdpanzerIV.localdomain> <20170529092906.GD21894@pathway.suse.cz> <20170531072233.GC7672@jagdpanzerIV.localdomain> <20170628121925.GN1538@pathway.suse.cz> <20170629073321.GA475@jagdpanzerIV.localdomain> <20170630070131.GA474@jagdpanzerIV.localdomain> <20170630131610.GT1538@pathway.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170630131610.GT1538@pathway.suse.cz> User-Agent: Mutt/1.8.3 (2017-05-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (06/30/17 15:16), Petr Mladek wrote: [..] > > I wonder if I could add some counter into task_struct. > It might be configurable. I am not sure if people would > want this enabled on production systems where the level > of messages should be lower anyway. I don't think it really matters which one of the tasks has issued way too many printk()-s. it's the state of the logbuf that matters after all. was it one task or 5 tasks, or 15 that pushed logbuf far ahead of console_seq, we need to throttle all of new printk() calls anyway. just because logbuf is already too far and we need to give console a chache to catch up. so let's activate throttling based on the logbuf state (those seq numbers). -ss