Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp6631040ybn; Mon, 30 Sep 2019 00:53:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqxqjb/8KM0Er3dA1iOto4zfr/bHFwzFppI1mgLNhfQ1nNAhjHaHV/w/5da2EK5G6uhRua56 X-Received: by 2002:a17:906:fc20:: with SMTP id ov32mr18322023ejb.22.1569830011642; Mon, 30 Sep 2019 00:53:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569830011; cv=none; d=google.com; s=arc-20160816; b=fFPZXuIu96jSAN32b87roHEBvQv8mcssLgnm6hNyoB5aoHfs2vNFVul4ejFZXhcWty 5GdPovRpBatIcQRjHz4H+v3Tn7MQzdjKGiTGZdh0bBU+aaTiwjRR6ph0BlG49KmtfWL7 F6sYVIAaymrO1JFUZEO25aX+njM7JmPYJZZtdTit8ZfXbTSdhQ91zY7nBgOMuYn6CRs5 +Z73D3obnXYlh91g7SHq6BlPmR8EdyGXLq8xY5/cJwz9DXonSN19f8Kqmj+3FcmWlGV0 5Vi3MgazgJWSxWMzvwzrWXbhOkk7PUfvu75ritb3cJHgQ66Pi0PI0r6rfa6ej6y+3Cf4 JS4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:autocrypt:openpgp:from:references:to :subject; bh=qkP2NV2XrpQqnR4zzuYnYxDMcxiYUURt8/RX7oNhWSI=; b=HWNZxo5OpOqhN1/Ayhxnzq3UMtS5821wv8fFAy9VE/adCVdkpEq511uRwBVsy4WcJW kiAi45sIHYRqsQlKjGeyJXmhhQCHB0spDjORGwDhTQLWXLNFX3jtVP7+1t+mSVTaNaJU nMX/6eFRO+SzrmalIyucgm5wyUn+LOkLbQV3rh/XFikuFcnbOliukaSP4PVoIl80CsF8 w5/3FlShD8bWs57+2RgQsI/kiECbb8l4OUGaWmsWpKdLJoddXW8b/FTN32Vk37pf7OO1 TwgquIZhITSs0LePctqw3K9TnHspLnlJD+F+XQffvfsVSU9PaRJXI0I7IwIvus4G1NC4 YWLw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g24si6883291ejo.355.2019.09.30.00.53.07; Mon, 30 Sep 2019 00:53:31 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729716AbfI3HwS (ORCPT + 99 others); Mon, 30 Sep 2019 03:52:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38520 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725897AbfI3HwR (ORCPT ); Mon, 30 Sep 2019 03:52:17 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0661A10DCC87; Mon, 30 Sep 2019 07:52:17 +0000 (UTC) Received: from [10.36.117.170] (ovpn-117-170.ams2.redhat.com [10.36.117.170]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3A24B5C207; Mon, 30 Sep 2019 07:52:16 +0000 (UTC) Subject: Re: [PATCH v1] powerpc/pseries: CMM: Drop page array To: Michael Ellerman , linux-kernel@vger.kernel.org References: <20190910163932.13160-1-david@redhat.com> <8c99aeb3-8287-1913-7362-464ac0c59ce1@redhat.com> <27742115-E5A4-4DF1-B223-5E6EB7A6E4F3@ellerman.id.au> From: David Hildenbrand Openpgp: preference=signencrypt Autocrypt: addr=david@redhat.com; prefer-encrypt=mutual; keydata= xsFNBFXLn5EBEAC+zYvAFJxCBY9Tr1xZgcESmxVNI/0ffzE/ZQOiHJl6mGkmA1R7/uUpiCjJ dBrn+lhhOYjjNefFQou6478faXE6o2AhmebqT4KiQoUQFV4R7y1KMEKoSyy8hQaK1umALTdL QZLQMzNE74ap+GDK0wnacPQFpcG1AE9RMq3aeErY5tujekBS32jfC/7AnH7I0v1v1TbbK3Gp XNeiN4QroO+5qaSr0ID2sz5jtBLRb15RMre27E1ImpaIv2Jw8NJgW0k/D1RyKCwaTsgRdwuK Kx/Y91XuSBdz0uOyU/S8kM1+ag0wvsGlpBVxRR/xw/E8M7TEwuCZQArqqTCmkG6HGcXFT0V9 PXFNNgV5jXMQRwU0O/ztJIQqsE5LsUomE//bLwzj9IVsaQpKDqW6TAPjcdBDPLHvriq7kGjt WhVhdl0qEYB8lkBEU7V2Yb+SYhmhpDrti9Fq1EsmhiHSkxJcGREoMK/63r9WLZYI3+4W2rAc UucZa4OT27U5ZISjNg3Ev0rxU5UH2/pT4wJCfxwocmqaRr6UYmrtZmND89X0KigoFD/XSeVv jwBRNjPAubK9/k5NoRrYqztM9W6sJqrH8+UWZ1Idd/DdmogJh0gNC0+N42Za9yBRURfIdKSb B3JfpUqcWwE7vUaYrHG1nw54pLUoPG6sAA7Mehl3nd4pZUALHwARAQABzSREYXZpZCBIaWxk ZW5icmFuZCA8ZGF2aWRAcmVkaGF0LmNvbT7CwX4EEwECACgFAljj9eoCGwMFCQlmAYAGCwkI BwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEE3eEPcA/4Na5IIP/3T/FIQMxIfNzZshIq687qgG 8Ubsp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JqEBpRNZemxmg55zC3GLvgLKd5A09MOM2BrMea+l0FUR+PuTenh2YmnmLRTro6eZ/qYwWkC u8FFIw4pT0OUDMyLgi+GI1aMpVogTZJ70FgV0pUAlpmrzk/bLbRkF3TwgucpyPtcpmQtTkWS gDS50QG9DR/1As3LLLcNkwJBZzBG6PWbvcOyrwMQUF1nl4SSPV0LLH63+BrrHasfJzxKXzqg rW28CTAE2x8qi7e/6M/+XXhrsMYG+uaViM7n2je3qKe7ofum3s4vq7oFCPsOgwARAQABwsFl BBgBAgAPBQJVy5+RAhsMBQkJZgGAAAoJEE3eEPcA/4NagOsP/jPoIBb/iXVbM+fmSHOjEshl KMwEl/m5iLj3iHnHPVLBUWrXPdS7iQijJA/VLxjnFknhaS60hkUNWexDMxVVP/6lbOrs4bDZ NEWDMktAeqJaFtxackPszlcpRVkAs6Msn9tu8hlvB517pyUgvuD7ZS9gGOMmYwFQDyytpepo YApVV00P0u3AaE0Cj/o71STqGJKZxcVhPaZ+LR+UCBZOyKfEyq+ZN311VpOJZ1IvTExf+S/5 lqnciDtbO3I4Wq0ArLX1gs1q1XlXLaVaA3yVqeC8E7kOchDNinD3hJS4OX0e1gdsx/e6COvy qNg5aL5n0Kl4fcVqM0LdIhsubVs4eiNCa5XMSYpXmVi3HAuFyg9dN+x8thSwI836FoMASwOl C7tHsTjnSGufB+D7F7ZBT61BffNBBIm1KdMxcxqLUVXpBQHHlGkbwI+3Ye+nE6HmZH7IwLwV W+Ajl7oYF+jeKaH4DZFtgLYGLtZ1LDwKPjX7VAsa4Yx7S5+EBAaZGxK510MjIx6SGrZWBrrV TEvdV00F2MnQoeXKzD7O4WFbL55hhyGgfWTHwZ457iN9SgYi1JLPqWkZB0JRXIEtjd4JEQcx +8Umfre0Xt4713VxMygW0PnQt5aSQdMD58jHFxTk092mU+yIHj5LeYgvwSgZN4airXk5yRXl SE+xAvmumFBY Organization: Red Hat GmbH Message-ID: <982d2b2f-203b-89fe-6e91-5dc401af90cf@redhat.com> Date: Mon, 30 Sep 2019 09:52:15 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <27742115-E5A4-4DF1-B223-5E6EB7A6E4F3@ellerman.id.au> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.64]); Mon, 30 Sep 2019 07:52:17 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 27.09.19 23:06, Michael Ellerman wrote: > > > On 27 September 2019 9:19:49 pm AEST, David Hildenbrand wrote: >> On 25.09.19 09:37, David Hildenbrand wrote: >>> On 10.09.19 18:39, David Hildenbrand wrote: >>>> We can simply store the pages in a list (page->lru), no need for a >>>> separate data structure (+ complicated handling). This is how most >>>> other balloon drivers store allocated pages without additional >> tracking >>>> data. >>>> >>>> For the notifiers, use page_to_pfn() to check if a page is in the >>>> applicable range. plpar_page_set_loaned()/plpar_page_set_active() >> were >>>> called with __pa(page_address()) for now, I assume we can simply >> switch >>>> to page_to_phys() here. The pfn_to_kaddr() handling is now mostly >> gone. >>>> >>>> Cc: Benjamin Herrenschmidt >>>> Cc: Paul Mackerras >>>> Cc: Michael Ellerman >>>> Cc: Arun KS >>>> Cc: Pavel Tatashin >>>> Cc: Thomas Gleixner >>>> Cc: Andrew Morton >>>> Cc: Vlastimil Babka >>>> Signed-off-by: David Hildenbrand >>>> --- >>>> >>>> Only compile-tested. I hope the page_to_phys() thingy is correct and >> I >>>> didn't mess up something else / ignoring something important why the >> array >>>> is needed. >>>> >>>> I stumbled over this while looking at how the memory isolation >> notifier is >>>> used - and wondered why the additional array is necessary. Also, I >> think >>>> by switching to the generic balloon compaction mechanism, we could >> get >>>> rid of the memory hotplug notifier and the memory isolation notifier >> in >>>> this code, as the migration capability of the inflated pages is the >> real >>>> requirement: >>>> commit 14b8a76b9d53346f2871bf419da2aaf219940c50 >>>> Author: Robert Jennings >>>> Date: Thu Dec 17 14:44:52 2009 +0000 >>>> >>>> powerpc: Make the CMM memory hotplug aware >>>> >>>> The Collaborative Memory Manager (CMM) module allocates >> individual pages >>>> over time that are not migratable. On a long running system >> this can >>>> severely impact the ability to find enough pages to support a >> hotplug >>>> memory remove operation. >>>> [...] >>>> >>>> Thoughts? >>> >>> Ping, is still feature still used at all? >>> >>> If nobody can test, any advise on which HW I need and how to trigger >> it? >>> >> >> So ... if CMM is no longer alive I propose ripping it out completely. >> Does anybody know if this feature is still getting used? Getting rid of >> the memory isolation notifier sounds desirable - either by scrapping >> CMM >> or by properly wiring up balloon compaction. > > It's still used AFAIK, but the people who wrote the code have left IBM, and I'm on leave. > > I'll be back in a week or so and will try and track down how to test it then. > Thanks - sure, take your time. I'll try to play with wiring up balloon compaction in the meantime. Cheers! > cheers > -- Thanks, David / dhildenb