Received: by 10.192.165.156 with SMTP id m28csp20339imm; Thu, 12 Apr 2018 15:39:21 -0700 (PDT) X-Google-Smtp-Source: AIpwx49c7vBPT5Y3RLGlpWQ35D364E1hQlwjIzgEfLCixyMX1bTL+M9HDFoN0xgJVYddaQxFWyMU X-Received: by 2002:a17:902:28e4:: with SMTP id f91-v6mr2868369plb.336.1523572761328; Thu, 12 Apr 2018 15:39:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523572761; cv=none; d=google.com; s=arc-20160816; b=dGoW06o3UD85majx33LPLijjfe1gtOrIQThNNEWlmdN5FXWO78PYk5BPClHBupXBhr HDwtZBbdqRduktyQW+ymgJeSPaoOVXL4AnmTVWcZIm0y1GmZOfY+miNUM9JQeJhty3id M9EPg+b8YR4p4HlxlQIa3UMhzk+BtufKkUij8Z/FDRdMBf70KvND/Jp+PhYgIIHI1PkD qby98rJUt2KjALaWs7fLF3XsrO2AjQF3lstNYLsqPsmxN/lJ7kjxeR7FI4qOs8gcdyUb NCpvaJRHZX6Oc6uXyxFGT2oaJ5DNTio1W9plflwy79+rS3Cn95E/p3ntWt1H9FVx0Ux0 9sIQ== 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:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=FGM74qX1Mfo35bvDdBXV9VT2DcYukJF9fBYgU5mDteM=; b=H9eWG9JuduZ2Su1t5TDR/+4gmmWOD8tyjsP9gBlOI1whwpnKsbI3hEMHdkiH/y6thR ONNJDTgq7QU3tOJg8UBsrcI2QAOwtWK7VRM8AbzMm7s5cho0+AeEbYrF1tkhmZhGUuMP UJGslF2FGWC0seuTYQDHu3BYbFsW+q6a927QLGouMTx17FMaTlHNswD/KGutlva1UG22 +4wOH7oShMaCGwzcvd4BtwpHL4MPGLuberapsCqiltWED+zlyLERZmyRkyGUng+5d7JG qs2sP8U4uK9H3KfIkLJWCKoDBnuhrjDIguqct1dpkIpLXCk9szUf/cR+q25B8FZc5eji qSPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=qSKOwN2K; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i14si1321907pgf.284.2018.04.12.15.38.54; Thu, 12 Apr 2018 15:39:21 -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; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=qSKOwN2K; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752467AbeDLU7X (ORCPT + 99 others); Thu, 12 Apr 2018 16:59:23 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:51900 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751600AbeDLU7V (ORCPT ); Thu, 12 Apr 2018 16:59:21 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w3CKujx5028439; Thu, 12 Apr 2018 20:58:50 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-2017-10-26; bh=FGM74qX1Mfo35bvDdBXV9VT2DcYukJF9fBYgU5mDteM=; b=qSKOwN2KV4OD7zs0WXeEk/toerv2dpZ7BvMC77FPIbMRKiL/wdOb0T2gj+Pl8j2PCPXS EeKl9aVnnaM1DC7POYRreXzqjbi5tu1tLwOyynONmI3CrldJbZTdIjHW3+LDeTeiQcP5 VO0ZIdv8Akgfcw+wYPQIOATC8wqQGhtc+55d/1b9KLVe5iWQquTvD5uhsMLVeOtmJVpr PO4KWYbszG2Pfi3kRhKyY0JQZ//OvjwdBrmWZhaxpi+kzwQ0pDaNQoWPw35EviVbV+cv Ah4SXudZjvqN37IVEmC2LOtQ7qafADHZcn2BBU/m1QLYdCCHNVirBSmbp4KBvMYc35PR jg== Received: from userv0022.oracle.com (userv0022.oracle.com [156.151.31.74]) by userp2130.oracle.com with ESMTP id 2h6ne7p3yu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 12 Apr 2018 20:58:50 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w3CKwnjj022577 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 12 Apr 2018 20:58:49 GMT Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w3CKwml9021120; Thu, 12 Apr 2018 20:58:48 GMT Received: from [192.168.1.164] (/98.246.252.205) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 12 Apr 2018 13:58:48 -0700 Subject: Re: [RFC PATCH 0/3] Interface for higher order contiguous allocations To: Reinette Chatre , linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: Michal Hocko , Christopher Lameter , Guy Shattah , Anshuman Khandual , Michal Nazarewicz , Vlastimil Babka , David Nellans , Laura Abbott , Pavel Machek , Dave Hansen References: <20180212222056.9735-1-mike.kravetz@oracle.com> <770445b3-6caa-a87a-5de7-3157fc5280c2@intel.com> <74b7c6e5-bce6-a70a-287a-af44765836c7@intel.com> From: Mike Kravetz Message-ID: <8f67cb20-3d70-274b-871b-11bedc687bd9@oracle.com> Date: Thu, 12 Apr 2018 13:58:47 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <74b7c6e5-bce6-a70a-287a-af44765836c7@intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8861 signatures=668698 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 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-1711220000 definitions=main-1804120199 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/12/2018 01:40 PM, Reinette Chatre wrote: > Hi Mike, > > On 2/15/2018 12:22 PM, Reinette Chatre wrote: >> On 2/12/2018 2:20 PM, Mike Kravetz wrote: >>> These patches came out of the "[RFC] mmap(MAP_CONTIG)" discussions at: >>> http://lkml.kernel.org/r/21f1ec96-2822-1189-1c95-79a2bb491571@oracle.com >>> >>> One suggestion in that thread was to create a friendlier interface that >>> could be used by drivers and others outside core mm code to allocate a >>> contiguous set of pages. The alloc_contig_range() interface is used for >>> this purpose today by CMA and gigantic page allocation. However, this is >>> not a general purpose interface. So, wrap alloc_contig_range() in the >>> more general interface: >>> >>> struct page *find_alloc_contig_pages(unsigned int order, gfp_t gfp, int nid, >>> nodemask_t *nodemask) >>> >>> No underlying changes are made to increase the likelihood that a contiguous >>> set of pages can be found and allocated. Therefore, any user of this >>> interface must deal with failure. The hope is that this interface will be >>> able to satisfy some use cases today. >> >> As discussed in another thread a new feature, Cache Pseudo-Locking, >> requires large contiguous regions. Until now I just exposed >> alloc_gigantic_page() to handle these allocations in my testing. I now >> moved to using find_alloc_contig_pages() as introduced here and all my >> tests passed. I do hope that an API supporting large contiguous regions >> become available. >> >> Thank you very much for creating this. >> >> Tested-by: Reinette Chatre > > Do you still intend on submitting these changes for inclusion? > > I would really like to use this work but unfortunately the original > patches submitted here do not apply anymore. I am encountering conflicts > with, for example: > > commit d9cc948f6fa1c3384037f500e0acd35f03850d15 > Author: Michal Hocko > Date: Wed Jan 31 16:20:44 2018 -0800 > > mm, hugetlb: integrate giga hugetlb more naturally to the allocation > path > > Thank you very much Thanks for the reminder Reinette. You were the only one to comment on the original proposal. In addition, my original use case may have gone away. So, this effort went to the bottom of my priority list. I am happy rebase the patches, but would really like to get additional comments. Allocation of hugetlbfs gigantic pages is the only existing user. Perhaps this is a natural progression of Michal's patch above as it moves all that special pfn range scanning out of hugetlb code. -- Mike Kravetz