Received: by 10.223.185.116 with SMTP id b49csp890311wrg; Fri, 16 Feb 2018 08:49:01 -0800 (PST) X-Google-Smtp-Source: AH8x224tsUhVdjE7ndUWw5+LbEYCqcUue5qlnhJxZfyjPxsnHoMcG4ViMSd0wNQgFXcy13ElykBT X-Received: by 10.99.50.66 with SMTP id y63mr5778571pgy.207.1518799741871; Fri, 16 Feb 2018 08:49:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518799741; cv=none; d=google.com; s=arc-20160816; b=rGHP3MYfgJkPBcW11EBR2ylAqtrlFgoP7FMew2/lwnzcACmn0aDCpWci8B1G+WNDeN lZrdpJ8a/K/wO1io1IDhsBVYU1r3RVb2q8X0iERYe+G3mNOLgyXCy90CP5qlhekv+fEE duHXepsSxS2dUxchV0O74sRgGc50Fc4pHvacf1DrGnru+pI2Fdtl010UFkyT31NfOq39 jav3fNi/rAHtcV2tWPAia0Z0OiSaV2euxifhIy3DCrAPcFItHlIO3RdRiJf52SvGdMxa jw2Ud5e7aHZiAkDsKsa26EoFhcL+aison/WiTS3mgG03G/NsE0Wcm47xqKMabM0K6TOn UGCg== 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:arc-authentication-results; bh=ZvS/jm+e/JLdGWrfH34IHczSazZBkbPiGl4eYFNonv0=; b=Atgcyz9cq9EhCHcdqJqoW7iAhbwzxKVVpeeozhcIiYnYJhwWKxqinpV+hyORckLVFv 1MKzS32r2rbvP1biXW/Qbaww+4L/r8rXdSoYvxNak4bt21a8RQEr/5mzWfDHBdmc3PIa x/feWj5y0C4ybYyVlpzfN6Ve+LyMEDo/IP/2POWPTSxvrNoo/tsuEBAaGLy8g8u2Ux0f wJqRTNV+icNHjd4N+yn3QjcJoPtsSAqu9hFFRHqIQGIR5LoM0BM9la1bA4OXi1D+Qd3P bZKajDftxS2wEjzcT9Gs74smHo1orcB00AxzhBInHXqmIyYsJGZOBKp27D05gxBN3K/z l7UQ== 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 s1si3739060pgq.180.2018.02.16.08.48.47; Fri, 16 Feb 2018 08:49:01 -0800 (PST) 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 S1165867AbeBOUWg (ORCPT + 99 others); Thu, 15 Feb 2018 15:22:36 -0500 Received: from mga17.intel.com ([192.55.52.151]:62681 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1033275AbeBOUWe (ORCPT ); Thu, 15 Feb 2018 15:22:34 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Feb 2018 12:22:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,517,1511856000"; d="scan'208";a="18047298" Received: from rchatre-mobl.amr.corp.intel.com (HELO [10.24.14.131]) ([10.24.14.131]) by orsmga007.jf.intel.com with ESMTP; 15 Feb 2018 12:22:33 -0800 Subject: Re: [RFC PATCH 0/3] Interface for higher order contiguous allocations To: Mike Kravetz , 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> From: Reinette Chatre Message-ID: <770445b3-6caa-a87a-5de7-3157fc5280c2@intel.com> Date: Thu, 15 Feb 2018 12:22:33 -0800 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <20180212222056.9735-1-mike.kravetz@oracle.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Mike, 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 Reinette