Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp3966564ybn; Fri, 27 Sep 2019 14:09:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqxssZbmo6tE6RVyK28wCByiF/CFvtXQTYTZzO9C34+DqCxUCPeD93iWIn9fDa1MGvtQhA8y X-Received: by 2002:a17:906:3281:: with SMTP id 1mr9648051ejw.181.1569618563643; Fri, 27 Sep 2019 14:09:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569618563; cv=none; d=google.com; s=arc-20160816; b=taVT9PwWkeMrIikLapc2J9WP+6mMHe5TUO4275vamwVNz62OIVxEAqJ855j39npMoS xzRjvwiVnCMW5E1FQnmFCE0oPLzyehGm85zST8lMF03SeAEJRlSExz57Orzb8pQPjLoO iYMJzfmqgCLi9Ax0iWrUIt6Q5YpDGYkGsMN6QsagLozSrkBSige03k7dFO2wve57mCVY nejTPyF831DYlzXtO18qBOVcc2jOgNVySEwd/8NSMbN1ARw91Hl0NvqYSHqfQcaRuIYW FUugRI3dStrdyuyWFtuQN2BxXjiwe6Tlhxjdhwt+zpHYeuLQbICOfBxHDCFVArbT8avg zSLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:from:to:subject :content-transfer-encoding:mime-version:references:in-reply-to :user-agent:date; bh=J17z36shDq2B+nqR63vlA8Lh9B56LrSpZZuLXTj3Umg=; b=uu+yNebdvorMZK40SmrApligWQq00U8AKbPtGrlQPP3miAj6TZIIy7DeMJ8nBb8c+o qah+xmBeRXNRnX2kKmBscc/05l1GdyrpWNoFz2PKDCegvTPfithEQE5BAXKBTbITox3K l39w59CsSk+ETx8D0r7aqKPqZHX+js7OXewFaaLWjqA57E1ouvbJpJWDUMCVFTcCtgdP 8BAWv4ffdP8NALk9TRLN/EJqkybQ8EeLBL2NEYXz4lMXc2nSAzONkz/RT8fMRif7FpNu cGVQUj6z5TmAwkfM746SHr/wnldB74ABgLH4WLELZivRg9YCl62vkbsY9spkDMLBApD4 sWKA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c52si2488933eda.132.2019.09.27.14.08.56; Fri, 27 Sep 2019 14:09:23 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726470AbfI0VGn convert rfc822-to-8bit (ORCPT + 99 others); Fri, 27 Sep 2019 17:06:43 -0400 Received: from bilbo.ozlabs.org ([203.11.71.1]:57573 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726029AbfI0VGn (ORCPT ); Fri, 27 Sep 2019 17:06:43 -0400 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 46g49D6DRlz9sDB; Sat, 28 Sep 2019 07:06:40 +1000 (AEST) Date: Sat, 28 Sep 2019 07:06:37 +1000 User-Agent: K-9 Mail for Android In-Reply-To: <8c99aeb3-8287-1913-7362-464ac0c59ce1@redhat.com> References: <20190910163932.13160-1-david@redhat.com> <8c99aeb3-8287-1913-7362-464ac0c59ce1@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT Subject: Re: [PATCH v1] powerpc/pseries: CMM: Drop page array To: David Hildenbrand , linux-kernel@vger.kernel.org From: Michael Ellerman Message-ID: <27742115-E5A4-4DF1-B223-5E6EB7A6E4F3@ellerman.id.au> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. cheers -- Sent from my Android phone with K-9 Mail. Please excuse my brevity.