From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752040AbdF3MpK (ORCPT ); Fri, 30 Jun 2017 08:45:10 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:33713 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751638AbdF3MpI (ORCPT ); Fri, 30 Jun 2017 08:45:08 -0400 Date: Fri, 30 Jun 2017 21:45:16 +0900 From: Sergey Senozhatsky To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , Sergey Senozhatsky , 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][PATCHv4 0/7] printk: introduce printing kernel threads Message-ID: <20170630124516.GB792@jagdpanzerIV.localdomain> References: <20170602090345.624-1-sergey.senozhatsky@gmail.com> <20170608081829.GA442@jagdpanzerIV.localdomain> <20170628134251.GQ1538@pathway.suse.cz> <20170629075630.GB14897@jagdpanzerIV.localdomain> <20170630121124.GF23069@pathway.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170630121124.GF23069@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 14:11), Petr Mladek wrote: > > 2) can offload printing to other CPUs from vprintk_emit() > > and avoid any of scheduler->timekeeping->etc. paths. which will > > replace printk_deferred(). > > I probably miss something. There is still called wake_up_process() > in this patchset and we could not do this in some scheduler and > timekeeping paths. Also we must not take the console_lock() in > these paths because it calls wake_up_process() as well. But > we want to flush few lines when possible. yes. but we could call wake_up_process() on !this_cpu. so we wouldn't take this_cpu ->rq lock and so on. CPU1 vprintk_emit() wake_up_process(printk_kthread on CPU2); -ss