Received: by 10.192.165.156 with SMTP id m28csp714422imm; Mon, 16 Apr 2018 07:35:08 -0700 (PDT) X-Google-Smtp-Source: AIpwx48nBGPeY6kV25yupnWUc0gerumV4gXlzCzbZXJE38++hFjxxyn8hHfqT6+xh7JhfzjQUAAT X-Received: by 2002:a17:902:4545:: with SMTP id m63-v6mr15645239pld.149.1523889308834; Mon, 16 Apr 2018 07:35:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523889308; cv=none; d=google.com; s=arc-20160816; b=BcyFOPQzCwD+YUQlbNlPm8P0sNoTihdIinqHU9GB6YW4+gFFkm4YWfVjxmV0YcN8nK ZF+QRQrUkoY231xOg2YkIA5uEKICdCHO7It5pb47hFAVW8QaVuywP4A/z++c3ud46aZl kXESUtCTBnU+CNXdz8WH+IolstIP8NEjrW0vjVV5ajCppc6V331vFscoxRhn3TwQxZQo ebOcg7coLv4URAf6AJH0pGIv6/0Tjj8D21WDWkSJ6dU/L54xwwcHIC8xb04+uebcaH09 OIHXOIUEjQjMPd1+5XxqhiyF59fgcby+H4fWO+2K9Mo03hC+F7halBarQlejTGHgSdsV +9DQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=2J+9CmDKha4/mCPVOkmH+uoAa1Qj9OVKpiKO9ICaeMU=; b=T29Z6cpvCPA8zK0vCWHfL7hQE9oUop1JDoHF5fnHVQToMsicSMNP4LMkjpfkq1Fwuw YkhOz8iEijl7+9PGWzV55b00nd6RdukT4IFoQr8TOGVBOru6Fj03ErbO4zjId6k+O8p9 xnJ0avk3fFWYhCKtVGAVPemOjp2dh2VyjYyuWDjo1DfMeTM47XgFLhE1P+Q2SopSqSiN hPZvtZbPS0CnbvgucMYgGRCf46Jwc1lllUeos1EOPMr6hdnHA0FGhOSq/LSl+Kb0NVrO AFDtn9Jc18EZJdPr16HIaOKxuYR2unvVHKJ19cUi/MYDT5edvamQAnY33ZChzI7eJ2E7 L5tw== 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 w15-v6si4766298plq.183.2018.04.16.07.34.55; Mon, 16 Apr 2018 07:35:08 -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 S1754895AbeDPNO0 (ORCPT + 99 others); Mon, 16 Apr 2018 09:14:26 -0400 Received: from mx2.suse.de ([195.135.220.15]:46983 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753479AbeDPNOY (ORCPT ); Mon, 16 Apr 2018 09:14:24 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 07665AE71; Mon, 16 Apr 2018 13:14:22 +0000 (UTC) Date: Mon, 16 Apr 2018 15:14:21 +0200 From: Michal Hocko To: Mike Kravetz Cc: Reinette Chatre , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Christopher Lameter , Guy Shattah , Anshuman Khandual , Michal Nazarewicz , Vlastimil Babka , David Nellans , Laura Abbott , Pavel Machek , Dave Hansen Subject: Re: [RFC PATCH 0/3] Interface for higher order contiguous allocations Message-ID: <20180416131421.GQ17484@dhcp22.suse.cz> References: <20180212222056.9735-1-mike.kravetz@oracle.com> <770445b3-6caa-a87a-5de7-3157fc5280c2@intel.com> <74b7c6e5-bce6-a70a-287a-af44765836c7@intel.com> <8f67cb20-3d70-274b-871b-11bedc687bd9@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8f67cb20-3d70-274b-871b-11bedc687bd9@oracle.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 12-04-18 13:58:47, Mike Kravetz wrote: > 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. Yes, that was and still is the plan. Turn the hackish contig allocator into something more usable so I guess it would be in line with what Reinette is after. -- Michal Hocko SUSE Labs