From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933442AbdCWJAt (ORCPT ); Thu, 23 Mar 2017 05:00:49 -0400 Received: from mail-pg0-f66.google.com ([74.125.83.66]:36527 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933361AbdCWJAr (ORCPT ); Thu, 23 Mar 2017 05:00:47 -0400 Date: Thu, 23 Mar 2017 18:00:42 +0900 From: Sergey Senozhatsky To: Petr Mladek Cc: Sergey Senozhatsky , Steven Rostedt , Andrew Morton , Linus Torvalds , Peter Zijlstra , "Rafael J . Wysocki" , linux-kernel@vger.kernel.org, Sergey Senozhatsky Subject: Re: [RFC][PATCH 2/4] printk: offload printing from wake_up_klogd_work_func() Message-ID: <20170323090042.GA376@jagdpanzerIV.localdomain> References: <20170306124554.828-1-sergey.senozhatsky@gmail.com> <20170306124554.828-3-sergey.senozhatsky@gmail.com> <20170317121944.GO3977@pathway.suse.cz> <20170318095738.GA398@jagdpanzerIV.localdomain> <20170320160928.GT3977@pathway.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170320160928.GT3977@pathway.suse.cz> User-Agent: Mutt/1.8.0 (2017-02-23) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (03/20/17 17:09), Petr Mladek wrote: [..] > > BTW: wake_up_klogd_work does not need to be per-CPU as well. > irq_work infrastructure heavily uses per-CPU variables. > But a global struct irq_work is safe, see irq_work_claim(). so I have a patch that turns wake_up_klogd_work into a global variable, out of curiosity, but I'm not entire sure about it. the sort of a problem is that queued irq_works still go into a per-CPU run_lists. per-CPU wake_up_klogd_work permits us to queue irq work on several CPUs so we might have better chances to execute wake_up_klogd_work_func(), while global wake_up_klogd_work will be only in one run_list. this can defer wake_up_klogd_work processing until that particular single CPU handles its interrupt and calls irq_work_run_list(). what do you think? -ss