Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp3465936imc; Wed, 13 Mar 2019 19:54:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqzc9/jJO6bW/SMY5EZ3VPFnH1tbCpu1swMvoUEi/DHNlSOTN9r7R7SIi3ZHywtfbLmo9YpG X-Received: by 2002:a65:5c41:: with SMTP id v1mr37358085pgr.404.1552532094943; Wed, 13 Mar 2019 19:54:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552532094; cv=none; d=google.com; s=arc-20160816; b=x/b06tL5z9n+eXozHX2L/y5cOnKHgD2rPaKsdW/1srYOAQ5tZpteBEOiKIlcL9a2jp BgWjoBuOnjBAeGdXqDY/yFskrYer9pPvklLKcMxHh30duwabjjIL1ugG7WdNStbFqv+R 8dJSQV/figTLcG+CgLrsGfDXmb8P0EsUm4hrpJFtc0s880Ae6n6ta/5tXPKU+zzeiMpm WHSF9QA1hcqoYZQzfl47sU4G2eRPrJeu/uG+wx2z/h85Aoa8CGq5QevdAIcl5DTZq6Ae Pb8Fx0Dr4P8Njjgm7pxyKhpsNhGFKr7fwOgGbvGXM+mkAOjMwvQiv5awW8CnIyQgFmcv qQQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=0xB4e1lfqpstrykhi2eHtig57G+/kVYcEgrsv936XPA=; b=gUhgibioVOteCL8Y+yRZmt3zhSFX/WgU6n5nhWfgudXGgMvHWFjq9GJa4l2u2ZKr6I HX0O2S9RkQVM0N5Vc1g6+SUWcKMKWaY+OVKntW3FlC1NVgqYX2Rj/tLqe9HQfAyS+7Wf CQqQklnDtUnPbTPaCRVYihGHBL/TB8lgbvHo04vr84erfTogyTT1BwrDPl9FpI/+m5ZG 3RZ7Wkbsm551T0FonMApS7VvyX3KZAs93SfK9627OMWRGCeCmprzXMtt1Y5OHCEeeLBY t1trK2R6voy9q0T7fuXzCdZ/jDStD7DAIytp4qZwJIOKIZl2U+rFySJ2esytkzgibTP7 z4nA== 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 f59si12953018plf.158.2019.03.13.19.54.38; Wed, 13 Mar 2019 19:54:54 -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 S1727093AbfCNCx3 (ORCPT + 99 others); Wed, 13 Mar 2019 22:53:29 -0400 Received: from ozlabs.org ([203.11.71.1]:42321 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726582AbfCNCx3 (ORCPT ); Wed, 13 Mar 2019 22:53:29 -0400 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 44KYDf4Y26z9s70; Thu, 14 Mar 2019 13:53:21 +1100 (AEDT) From: Michael Ellerman To: Alexandre Ghiti , Andrew Morton , Vlastimil Babka , Catalin Marinas , Will Deacon , Benjamin Herrenschmidt , Paul Mackerras , Martin Schwidefsky , Heiko Carstens , Yoshinori Sato , Rich Felker , "David S . Miller" , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H . Peter Anvin" , x86@kernel.org, Dave Hansen , Andy Lutomirski , Peter Zijlstra , Mike Kravetz , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-mm@kvack.org, "Aneesh Kumar K.V" Cc: Alexandre Ghiti Subject: Re: [PATCH v6 4/4] hugetlb: allow to free gigantic pages regardless of the configuration In-Reply-To: <20190307132015.26970-5-alex@ghiti.fr> References: <20190307132015.26970-1-alex@ghiti.fr> <20190307132015.26970-5-alex@ghiti.fr> Date: Thu, 14 Mar 2019 13:53:21 +1100 Message-ID: <87va0m9nfi.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Cc += Aneesh ] Alexandre Ghiti writes: > diff --git a/arch/powerpc/include/asm/book3s/64/hugetlb.h b/arch/powerpc/include/asm/book3s/64/hugetlb.h > index 5b0177733994..d04a0bcc2f1c 100644 > --- a/arch/powerpc/include/asm/book3s/64/hugetlb.h > +++ b/arch/powerpc/include/asm/book3s/64/hugetlb.h > @@ -32,13 +32,6 @@ static inline int hstate_get_psize(struct hstate *hstate) > } > } > > -#ifdef CONFIG_ARCH_HAS_GIGANTIC_PAGE > -static inline bool gigantic_page_supported(void) > -{ > - return true; > -} > -#endif This is going to clash with: https://patchwork.ozlabs.org/patch/1047003/ Which does: @@ -35,6 +35,13 @@ static inline int hstate_get_psize(struct hstate *hstate) #ifdef CONFIG_ARCH_HAS_GIGANTIC_PAGE static inline bool gigantic_page_supported(void) { + /* + * We used gigantic page reservation with hypervisor assist in some case. + * We cannot use runtime allocation of gigantic pages in those platforms + * This is hash translation mode LPARs. + */ + if (firmware_has_feature(FW_FEATURE_LPAR) && !radix_enabled()) + return false; return true; } #endif Not sure how to resolve it. cheers