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=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 E44E0C43331 for ; Sat, 9 Nov 2019 14:57:57 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A6FCD207FA for ; Sat, 9 Nov 2019 14:57:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A6FCD207FA 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 38CFB6B0007; Sat, 9 Nov 2019 09:57:57 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 33D586B0008; Sat, 9 Nov 2019 09:57:57 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 22D086B000A; Sat, 9 Nov 2019 09:57:57 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0080.hostedemail.com [216.40.44.80]) by kanga.kvack.org (Postfix) with ESMTP id 0AF436B0007 for ; Sat, 9 Nov 2019 09:57:57 -0500 (EST) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with SMTP id 8BB51180AD81D for ; Sat, 9 Nov 2019 14:57:56 +0000 (UTC) X-FDA: 76137043752.13.tooth32_4540beac73015 X-HE-Tag: tooth32_4540beac73015 X-Filterd-Recvd-Size: 5370 Received: from outbound-smtp01.blacknight.com (outbound-smtp01.blacknight.com [81.17.249.7]) by imf43.hostedemail.com (Postfix) with ESMTP for ; Sat, 9 Nov 2019 14:57:55 +0000 (UTC) Received: from mail.blacknight.com (pemlinmail03.blacknight.ie [81.17.254.16]) by outbound-smtp01.blacknight.com (Postfix) with ESMTPS id 5E16398D5A for ; Sat, 9 Nov 2019 14:57:54 +0000 (GMT) Received: (qmail 3273 invoked from network); 9 Nov 2019 14:57:54 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.23.195]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 9 Nov 2019 14:57:54 -0000 Date: Sat, 9 Nov 2019 14:57:52 +0000 From: Mel Gorman To: Alexander Duyck Cc: Michal Hocko , David Hildenbrand , akpm@linux-foundation.org, aarcange@redhat.com, dan.j.williams@intel.com, dave.hansen@intel.com, konrad.wilk@oracle.com, lcapitulino@redhat.com, mm-commits@vger.kernel.org, mst@redhat.com, osalvador@suse.de, pagupta@redhat.com, pbonzini@redhat.com, riel@surriel.com, vbabka@suse.cz, wei.w.wang@intel.com, willy@infradead.org, yang.zhang.wz@gmail.com, linux-mm@kvack.org Subject: Re: + mm-introduce-reported-pages.patch added to -mm tree Message-ID: <20191109145752.GW3016@techsingularity.net> References: <20191106165416.GO8314@dhcp22.suse.cz> <20191106221150.GR3016@techsingularity.net> <673862eb7f0425f638ea3fc507d0e8049ee4133c.camel@linux.intel.com> <20191107102045.GS3016@techsingularity.net> <73c0477e6e1672d5d36d4aa673b64cda10590a9d.camel@linux.intel.com> <20191108094340.GT3016@techsingularity.net> <4c3e787b5db923de8599eafee46c1235eacd2432.camel@linux.intel.com> <20191108184124.GV3016@techsingularity.net> <3161e0ec205852f8fcd1559f2dc177e42549708b.camel@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <3161e0ec205852f8fcd1559f2dc177e42549708b.camel@linux.intel.com> 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 Fri, Nov 08, 2019 at 12:29:47PM -0800, Alexander Duyck wrote: > On Fri, 2019-11-08 at 18:41 +0000, Mel Gorman wrote: > > On Fri, Nov 08, 2019 at 08:17:49AM -0800, Alexander Duyck wrote: > > > > > > > > > > > > From your perspective, I see it's a bit annoying because in the final > > > > result, the code should be identical. However, it'll be a lot clearer > > > > during review what is required, what level of complexity optimisations > > > > add and the performance of it. The changelog should include what metric > > > > you are using to evaluate the performance, the test case and the delta. It > > > > also will be easier from a debugging perspective as minimally a bisection > > > > could identify if a bug was due to the core mechanism itself or one of > > > > the optimisations. Finally, it leaves open the possibility that someone > > > > can evaluate a completely different set of optimisations. Whatever the > > > > alternative approaches are, the actual interface to virtio ballon surely > > > > is the same (I don't actually know, I just can't see why the virtio ABI > > > > would be depend on how the pages are isolated, tracked and reported). > > > > > > The virtio-balloon interface is the same at this point between my solution > > > and Nitesh's. So the only real disagreement in terms of the two solutions > > > is about keeping the bit in the page and the list manipulation versus the > > > external bitmap and the hunt and peck approach. > > > > > > > This is good news because it means that when/if Nitesh's approach is ready > > that the optimisations can be reverted and the new approach applied and > > give a like-like comparison if appropriate. The core feature and interface > > to userspace would remain the same and stay available regardless of how > > it's optimised. Maybe it's the weekend talking but I think structuring > > the series like that will allow forward progress to be made. > > So quick question. > > Any issue with me manipulating the lists like you do with the compaction > code? I ask because most of the overhead I was encountering was likely due > to walking the list so many times. That doesn't surprise me because it was necessary for the fast isolation in compaction to reduce the overhead when compaction was running at high frequency. > If I do the split/splice style logic > that should reduce the total number of trips through the free lists since > I could push the reported pages to the tail of the list. For now I am > working on that as an alternate patch to the existing reported_boundary > approach just as an experiment. I don't have a problem with that although it should be split out and shared between compaction and the virtio balloon if possible. The consequences are that compaction and the balloon might interfere with each other. That would increase the overhead of compaction and the balloon if they both were running at the same time. However, given that the balloon will have a performance impact anyway, I don't think it's worth worrying about because functionally it should be fine. -- Mel Gorman SUSE Labs