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.4 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 444EFCA9EA9 for ; Fri, 18 Oct 2019 18:29:52 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 0BE4B2082C for ; Fri, 18 Oct 2019 18:29:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="irU81VrR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0BE4B2082C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 9150B8E0005; Fri, 18 Oct 2019 14:29:51 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 89DA78E0003; Fri, 18 Oct 2019 14:29:51 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7654F8E0005; Fri, 18 Oct 2019 14:29:51 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0157.hostedemail.com [216.40.44.157]) by kanga.kvack.org (Postfix) with ESMTP id 4EE408E0003 for ; Fri, 18 Oct 2019 14:29:51 -0400 (EDT) Received: from smtpin17.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with SMTP id B26128788 for ; Fri, 18 Oct 2019 18:29:50 +0000 (UTC) X-FDA: 76057744140.17.loss50_38c73cc68f942 X-HE-Tag: loss50_38c73cc68f942 X-Filterd-Recvd-Size: 5508 Received: from aserp2120.oracle.com (aserp2120.oracle.com [141.146.126.78]) by imf38.hostedemail.com (Postfix) with ESMTP for ; Fri, 18 Oct 2019 18:29:49 +0000 (UTC) Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x9IIJfYu123323; Fri, 18 Oct 2019 18:29:45 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2019-08-05; bh=hXYMrEGZzwQiBxefoyJmePRgdYQb4j68CrcBDe3IDzc=; b=irU81VrR8BTGLN/APpFS6rFQslAg28wtt7vglzPr5k/IKawaYwfKfMh34HxiwPz94aoh XkCrBIM6l4o4QjmnbYgatJPl9bbrrDynx6tk907cdw9lLeGXLPqyuCZgbJhAEvCBpPke X60aYbk4UpEn1GcAyAmX4zkVlK24V2SpQZJ6lGfxzBoYfalMg5zpMwHPiEQxhGMJuAkx Z7mIO8Vd6FOOZTsGsnadC2Caw0gqOghhxhwqLPFKnJSC7t7Vgt6+uxI2G+QlDN22e6Ut 95//l/QYvn0FoSNHiU51RjTB+gcIO15O7gNImniu7VxLDO6OvvNJlSG4SRIXTwW2AqRx XQ== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2120.oracle.com with ESMTP id 2vq0q45hj1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 18 Oct 2019 18:29:45 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x9IIN4Gd145695; Fri, 18 Oct 2019 18:29:44 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userp3020.oracle.com with ESMTP id 2vq0ewyd9b-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 18 Oct 2019 18:29:44 +0000 Received: from abhmp0020.oracle.com (abhmp0020.oracle.com [141.146.116.26]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x9IITfS8021199; Fri, 18 Oct 2019 18:29:41 GMT Received: from [192.168.1.222] (/71.63.128.209) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 18 Oct 2019 18:29:41 +0000 Subject: Re: [PATCH] hugetlb: Add nohugepages parameter to prevent hugepages creation To: "Guilherme G. Piccoli" , Michal Hocko , Qian Cai Cc: Guilherme Piccoli , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Jay Vosburgh , "Guilherme G. Piccoli" References: <4641B95A-6DD8-4E8A-AD53-06E7B72D956C@lca.pw> <20191015121803.GB24932@dhcp22.suse.cz> <20191015140508.GJ317@dhcp22.suse.cz> <2d593c95-3c69-8f50-17ff-223bd607caf1@gpiccoli.net> From: Mike Kravetz Message-ID: <2df9c30d-b1e0-648e-93ba-85c78fbcbd0e@oracle.com> Date: Fri, 18 Oct 2019 11:29:40 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.1 MIME-Version: 1.0 In-Reply-To: <2d593c95-3c69-8f50-17ff-223bd607caf1@gpiccoli.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9414 signatures=668684 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=27 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1910180165 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9414 signatures=668684 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=27 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1910180165 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000004, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 10/15/19 7:09 AM, Guilherme G. Piccoli wrote: > > > On 10/15/19 11:05 AM, Michal Hocko wrote: >> On Tue 15-10-19 10:58:36, Guilherme G. Piccoli wrote: >>> On 10/15/19 9:18 AM, Michal Hocko wrote: >>>> I do agree with Qian Cai here. Kdump kernel requires a very tailored >>>> environment considering it is running in a very restricted >>>> configuration. The hugetlb pre-allocation sounds like a tooling problem >>>> and should be fixed at that layer. >>>> >>> >>> Hi Michal, thanks for your response. Can you suggest me a current way of >>> preventing hugepages for being created, using userspace? The goal for this >>> patch is exactly this, introduce such a way. >> >> Simply restrict the environment to not allocate any hugepages? Kdump >> already controls the kernel command line and it also starts only a very >> minimal subset of services. So who is allocating those hugepages? >> sysctls should be already excluded by default as Qian mentioned. >> > > > OK, thanks Michal and Qian, I'll try to make things work from kdump perspective. The trick part is exactly preventing the sysctl to get applied heh > Please do let us know if this can be done in tooling. I am not opposed to the approach taken in your v2 patch as it essentially uses the hugepages_supported() functionality that exists today. However, it seems that other distros have ways around this issue. As such, I would prefer if the issue was addressed in the tooling. -- Mike Kravetz