From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 87621C34047 for ; Wed, 19 Feb 2020 14:59:14 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 53299207FD for ; Wed, 19 Feb 2020 14:59:14 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 53299207FD Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=techsingularity.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id DBC726B0003; Wed, 19 Feb 2020 09:59:13 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D6D726B0006; Wed, 19 Feb 2020 09:59:13 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C825E6B0007; Wed, 19 Feb 2020 09:59:13 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0082.hostedemail.com [216.40.44.82]) by kanga.kvack.org (Postfix) with ESMTP id AE32B6B0003 for ; Wed, 19 Feb 2020 09:59:13 -0500 (EST) Received: from smtpin06.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 5DD08381E for ; Wed, 19 Feb 2020 14:59:13 +0000 (UTC) X-FDA: 76507184586.06.snake66_335cf9aa9f037 X-HE-Tag: snake66_335cf9aa9f037 X-Filterd-Recvd-Size: 3344 Received: from outbound-smtp35.blacknight.com (outbound-smtp35.blacknight.com [46.22.139.218]) by imf42.hostedemail.com (Postfix) with ESMTP for ; Wed, 19 Feb 2020 14:59:12 +0000 (UTC) Received: from mail.blacknight.com (unknown [81.17.254.26]) by outbound-smtp35.blacknight.com (Postfix) with ESMTPS id 3B3C5ADE for ; Wed, 19 Feb 2020 14:59:11 +0000 (GMT) Received: (qmail 18112 invoked from network); 19 Feb 2020 14:59:10 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.18.57]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 19 Feb 2020 14:59:10 -0000 Date: Wed, 19 Feb 2020 14:59:08 +0000 From: Mel Gorman To: Alexander Duyck Cc: kvm@vger.kernel.org, david@redhat.com, mst@redhat.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, akpm@linux-foundation.org, yang.zhang.wz@gmail.com, pagupta@redhat.com, konrad.wilk@oracle.com, nitesh@redhat.com, riel@surriel.com, willy@infradead.org, lcapitulino@redhat.com, dave.hansen@intel.com, wei.w.wang@intel.com, aarcange@redhat.com, pbonzini@redhat.com, dan.j.williams@intel.com, mhocko@kernel.org, alexander.h.duyck@linux.intel.com, vbabka@suse.cz, osalvador@suse.de Subject: Re: [PATCH v17 7/9] mm/page_reporting: Rotate reported pages to the tail of the list Message-ID: <20200219145908.GT3466@techsingularity.net> References: <20200211224416.29318.44077.stgit@localhost.localdomain> <20200211224708.29318.16862.stgit@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20200211224708.29318.16862.stgit@localhost.localdomain> User-Agent: Mutt/1.10.1 (2018-07-13) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, Feb 11, 2020 at 02:47:08PM -0800, Alexander Duyck wrote: > From: Alexander Duyck > > Rather than walking over the same pages again and again to get to the pages > that have yet to be reported we can save ourselves a significant amount of > time by simply rotating the list so that when we have a full list of > reported pages the head of the list is pointing to the next non-reported > page. Doing this should save us some significant time when processing each > free list. > > This doesn't gain us much in the standard case as all of the non-reported > pages should be near the top of the list already. However in the case of > page shuffling this results in a noticeable improvement. Below are the > will-it-scale page_fault1 w/ THP numbers for 16 tasks with and without > this patch. > > Without: > tasks processes processes_idle threads threads_idle > 16 8093776.25 0.17 5393242.00 38.20 > > With: > tasks processes processes_idle threads threads_idle > 16 8283274.75 0.17 5594261.00 38.15 > > Signed-off-by: Alexander Duyck Thanks for pulling this patch out and noting its impact. I think the rotation is ok and if it turns out I missed something, it'll be relatively easy to back out just the optimisation and leave the rest of the feature intact. Acked-by: Mel Gorman -- Mel Gorman SUSE Labs