Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753692AbcLTC0i (ORCPT ); Mon, 19 Dec 2016 21:26:38 -0500 Received: from mail-pf0-f195.google.com ([209.85.192.195]:32883 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751432AbcLTC0h (ORCPT ); Mon, 19 Dec 2016 21:26:37 -0500 Date: Tue, 20 Dec 2016 12:26:15 +1000 From: Nicholas Piggin To: Dave Hansen Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, agruenba@redhat.com, rpeterso@redhat.com, mgorman@techsingularity.net, peterz@infradead.org, luto@kernel.org, swhiteho@redhat.com, torvalds@linux-foundation.org Subject: Re: [RFC][PATCH] make global bitlock waitqueues per-node Message-ID: <20161220122615.1f4b494d@roar.ozlabs.ibm.com> In-Reply-To: <20161219225826.F8CB356F@viggo.jf.intel.com> References: <20161219225826.F8CB356F@viggo.jf.intel.com> Organization: IBM X-Mailer: Claws Mail 3.14.1 (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 Content-Length: 1400 Lines: 33 On Mon, 19 Dec 2016 14:58:26 -0800 Dave Hansen wrote: > I saw a 4.8->4.9 regression (details below) that I attributed to: > > 9dcb8b685f mm: remove per-zone hashtable of bitlock waitqueues > > That commit took the bitlock waitqueues from being dynamically-allocated > per-zone to being statically allocated and global. As suggested by > Linus, this makes them per-node, but keeps them statically-allocated. > > It leaves us with more waitqueues than the global approach, inherently > scales it up as we gain nodes, and avoids generating code for > page_zone() which was evidently quite ugly. The patch is pretty darn > tiny too. > > This turns what was a ~40% 4.8->4.9 regression into a 17% gain over > what on 4.8 did. That gain is a _bit_ surprising, but not entirely > unexpected since we now get much simpler code from no page_zone() and a > fixed-size array for which we don't have to follow a pointer (and get to > do power-of-2 math). I'll have to respin the PageWaiters patch and resend it. There were just a couple of small issues picked up in review. I've just got side tracked with getting a few other things done and haven't had time to benchmark it properly. I'd still like to see what per-node waitqueues does on top of that. If it's significant for realistic workloads then it could be done for the page waitqueues as Linus said. Thanks, Nick