From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751934AbdKDDNW (ORCPT ); Fri, 3 Nov 2017 23:13:22 -0400 Received: from mail-pf0-f182.google.com ([209.85.192.182]:44189 "EHLO mail-pf0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750959AbdKDDNU (ORCPT ); Fri, 3 Nov 2017 23:13:20 -0400 X-Google-Smtp-Source: ABhQp+ScZvoYsLTDuaSrAJwUw0kckdnj6j9bStmjocMC47GbXJW4YZOqwKfkGKU1faM7Ru6v9qVOBg== Date: Sat, 4 Nov 2017 12:13:13 +0900 From: Sergey Senozhatsky To: Steven Rostedt Cc: Vlastimil Babka , LKML , Peter Zijlstra , akpm@linux-foundation.org, linux-mm@kvack.org, Cong Wang , Dave Hansen , Johannes Weiner , Mel Gorman , Michal Hocko , Petr Mladek , Sergey Senozhatsky , "yuwang.yuwang" , Linus Torvalds , Jan Kara , Mathieu Desnoyers , Tetsuo Handa Subject: Re: [PATCH v3] printk: Add console owner and waiter logic to load balance console writes Message-ID: <20171104031313.GA539@tigerII.localdomain> References: <20171102134515.6eef16de@gandalf.local.home> <82a3df5e-c8ad-dc41-8739-247e5034de29@suse.cz> <20171102231507.18f6b3b6@vmware.local.home> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171102231507.18f6b3b6@vmware.local.home> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On (11/02/17 23:15), Steven Rostedt wrote: > On Thu, 2 Nov 2017 23:16:16 +0100 > Vlastimil Babka wrote: > > > > + if (spin) { > > > + /* We spin waiting for the owner to release us */ > > > + spin_acquire(&console_owner_dep_map, 0, 0, _THIS_IP_); > > > + /* Owner will clear console_waiter on hand off */ > > > + while (!READ_ONCE(console_waiter)) > > > > This should not be negated, right? We should spin while it's true, not > > false. > > Ug, yes. How did that not crash in my tests. Ah, right... Good catch, Vlastimil. The V1 didn't work as expected on my tests. -ss