From patchwork Tue Apr 7 01:04:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roman Gushchin X-Patchwork-Id: 11477097 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A36B7913 for ; Tue, 7 Apr 2020 01:04:42 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 5C2092076E for ; Tue, 7 Apr 2020 01:04:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=fb.com header.i=@fb.com header.b="DhYnqllR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5C2092076E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=fb.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 953178E0005; Mon, 6 Apr 2020 21:04:41 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 8DC5E8E0001; Mon, 6 Apr 2020 21:04:41 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7A36B8E0005; Mon, 6 Apr 2020 21:04:41 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0098.hostedemail.com [216.40.44.98]) by kanga.kvack.org (Postfix) with ESMTP id 5D9668E0001 for ; Mon, 6 Apr 2020 21:04:41 -0400 (EDT) Received: from smtpin13.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 06052181AEF3E for ; Tue, 7 Apr 2020 01:04:41 +0000 (UTC) X-FDA: 76679263962.13.can77_45ee7372ce54d X-Spam-Summary: 2,0,0,0ab7a68ec5f9893d,d41d8cd98f00b204,prvs=1366fabe95=guro@fb.com,,RULES_HIT:41:355:379:541:966:968:988:989:1260:1261:1277:1311:1313:1314:1345:1437:1513:1515:1516:1518:1521:1534:1541:1711:1730:1747:1777:1792:1801:2196:2199:2393:2559:2562:3138:3139:3140:3141:3142:3352:3865:3866:3867:3868:3870:3871:3872:4362:4385:4605:5007:6119:6261:6630:6653:7901:9010:9040:10004:10400:11026:11658:11914:12043:12296:12297:12438:12679:12895:13069:13161:13229:13311:13357:14096:14097:14181:14394:14581:14721:21080:21451:21627:30054:30064,0,RBL:67.231.153.30:@fb.com:.lbl8.mailshell.net-62.12.0.100 64.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:23,LUA_SUMMARY:none X-HE-Tag: can77_45ee7372ce54d X-Filterd-Recvd-Size: 4206 Received: from mx0b-00082601.pphosted.com (mx0b-00082601.pphosted.com [67.231.153.30]) by imf30.hostedemail.com (Postfix) with ESMTP for ; Tue, 7 Apr 2020 01:04:40 +0000 (UTC) Received: from pps.filterd (m0109331.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 03713SZe013853 for ; Mon, 6 Apr 2020 18:04:39 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=facebook; bh=S0ioYLMHpN25Y2gPp3J+lnRWbfqozyUe1QBToHd3GdQ=; b=DhYnqllRM1//uwS1elmA0PKQezZDLDlE1EkXBpazHjZ4e5Afp3fXSafcMxANiCOkZ8sM TAEUj83avJ7uosOxkGchQZqp8aBZWbD1gzrgc2k/OZ+qiwmRU1jNNaO+zVyhGqVopjCr w05Q3+CHOSNGFVhEAM9R1ydDkDVS4HziY7E= Received: from mail.thefacebook.com ([163.114.132.120]) by mx0a-00082601.pphosted.com with ESMTP id 306r2g8nuh-4 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Mon, 06 Apr 2020 18:04:39 -0700 Received: from intmgw004.06.prn3.facebook.com (2620:10d:c085:108::8) by mail.thefacebook.com (2620:10d:c085:11d::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1847.3; Mon, 6 Apr 2020 18:04:38 -0700 Received: by devvm2643.prn2.facebook.com (Postfix, from userid 111017) id 2BCC33C9170A7; Mon, 6 Apr 2020 18:04:37 -0700 (PDT) Smtp-Origin-Hostprefix: devvm From: Roman Gushchin Smtp-Origin-Hostname: devvm2643.prn2.facebook.com To: Andrew Morton CC: Aslan Bakirov , Michal Hocko , , , , Rik van Riel , Mike Kravetz , Roman Gushchin Smtp-Origin-Cluster: prn2c23 Subject: [PATCH v4 0/2] mm: using CMA for 1 GB hugepages allocation Date: Mon, 6 Apr 2020 18:04:29 -0700 Message-ID: <20200407010431.1286488-1-guro@fb.com> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.676 definitions=2020-04-06_14:2020-04-06,2020-04-06 signatures=0 X-Proofpoint-Spam-Details: rule=fb_default_notspam policy=fb_default score=0 adultscore=0 mlxscore=0 malwarescore=0 bulkscore=0 phishscore=0 mlxlogscore=724 lowpriorityscore=0 clxscore=1015 priorityscore=1501 impostorscore=0 suspectscore=2 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2004070008 X-FB-Internal: deliver 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: The patchset adds a hugetlb_cma boot option, which allows to reserve a cma area which can be later used for 1 GB hugepages allocations. This is v4 of the patch(set). It contains a patch from Aslan, which adds a useful function of the cma side, and the previous version of the hugetlb_cma patch (v3) with all following cleanups and fixes squashed, plus the following changes: 1) removed the hard-coded archs list from docs 2) added a warning printing on non-supported archs 3) hugetlb_lock is temporarily dropped in update_and_free_page() I've retained Michal's and Mike's acks, because changes are not significant. Please, let me know if there is something wrong. Thanks! Aslan Bakirov (1): mm: cma: NUMA node interface Roman Gushchin (1): mm: hugetlb: optionally allocate gigantic hugepages using cma .../admin-guide/kernel-parameters.txt | 8 ++ arch/arm64/mm/init.c | 6 + arch/x86/kernel/setup.c | 4 + include/linux/cma.h | 13 ++- include/linux/hugetlb.h | 12 ++ include/linux/memblock.h | 3 + mm/cma.c | 16 +-- mm/hugetlb.c | 109 ++++++++++++++++++ mm/memblock.c | 2 +- 9 files changed, 163 insertions(+), 10 deletions(-)