From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752608AbdKHO34 (ORCPT ); Wed, 8 Nov 2017 09:29:56 -0500 Received: from mail.kernel.org ([198.145.29.99]:47806 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751650AbdKHO3z (ORCPT ); Wed, 8 Nov 2017 09:29:55 -0500 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 44F72214EE 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: Wed, 8 Nov 2017 09:29:51 -0500 From: Steven Rostedt To: Sergey Senozhatsky Cc: Tejun Heo , Tetsuo Handa , linux-kernel@vger.kernel.org, akpm@linux-foundation.org, linux-mm@kvack.org, xiyou.wangcong@gmail.com, dave.hansen@intel.com, hannes@cmpxchg.org, mgorman@suse.de, mhocko@kernel.org, pmladek@suse.com, sergey.senozhatsky@gmail.com, vbabka@suse.cz Subject: Re: [PATCH v3] printk: Add console owner and waiter logic to load balance console writes Message-ID: <20171108092951.4d677bca@gandalf.local.home> In-Reply-To: <20171108051955.GA468@jagdpanzerIV> References: <20171102134515.6eef16de@gandalf.local.home> <201711062106.ADI34320.JFtOFFHOOQVLSM@I-love.SAKURA.ne.jp> <20171107014015.GA1822@jagdpanzerIV> <20171108051955.GA468@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 On Wed, 8 Nov 2017 14:19:55 +0900 Sergey Senozhatsky wrote: > the change goes further. I did express some of my concerns during the KS, > I'll just bring them to the list. > > > we now always shift printing from a save - scheduleable - context to > a potentially unsafe one - atomic. by example: And vice versa. We are now likely to go from a unscheduleable context to a schedule one, where before, that didn't exist. And my approach, makes it more likely that the task doing the printk prints its own message, and less likely to print someone else's. > > CPU0 CPU1~CPU10 CPU11 > > console_lock() > > printk(); > > console_unlock() IRQ > set console_owner printk() > sees console_owner > set console_waiter > sees console_waiter > break > console_unlock() > ^^^^ lockup [?] How? > > > so we are forcibly moving console_unlock() from safe CPU0 to unsafe CPU11. > previously we would continue printing from a schedulable context. And previously, we could be in unsafe CPU11 printing, and keep adding to the buffer from safe CPUs, keeping CPU11 from ever stopping. If anything, the patch makes the situation better, not worse. -- Steve