Received: by 10.223.185.116 with SMTP id b49csp1137601wrg; Wed, 14 Feb 2018 12:12:10 -0800 (PST) X-Google-Smtp-Source: AH8x227lvnrl3XBxvU2gg/ON/bsWZvenfmTo5kgkHM+oytfqQu9cTvmLe3HkYaLL5nS6jT0/hckj X-Received: by 2002:a17:902:4083:: with SMTP id c3-v6mr199619pld.90.1518639130136; Wed, 14 Feb 2018 12:12:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518639130; cv=none; d=google.com; s=arc-20160816; b=ZxcyvGDzWcRxpxrHylMK17bvEyb0ISNJFUqK1jGoH7BmO9NIgnbteqD7HnxnzNR9nx ywO6fjpFPx8pwLB3YZHVwo58zDKUrA/bL1C9aDrZ4C0ZkxXxZQtjEHxuPgeRws57o7mC 13nkL7eBgTkNLcRhXQBHULCKWuU5iSiB451/RSNvjqRCWkB/40OrS2FHgmYE+9kP1557 j9+AgQpr4ZmZRbgvi31T7KNcKxUrmNObwvqwVt1yVWe05WNb8U32XGsX/DDbtP17fqfK GotDncMFyMEIoJvJCZixYTnTgzv0cbpejV+uvs6u059aywae76q4RlaorhJfNTMx0Ubl wdnw== 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=l8vaebjmh3Ldk1w3nC3IS8rsWYlRgZHCwtX8y05JvNg=; b=RAn0vyTcD4GWomA7Q9LJBnZKsStM2jDfltqRaiapVwzWo0Bc1bI+CLWapA0fvP0RYe KRaArht3beccL4ySFPDl59L/UfoNmYLb0B3eNN/MwZp/1iKqkA3/ezqgjddjMN3rRV0N /XbxSn7MZuvs3kyxQ2koVNmD/h8mseoLXtces39oM2oGzbYhW7kTE4X6sJ9bfhnc9kE6 VteTtkz8V0nY6ehYgXwGpirSHOVvRSqFKXp3UDGaGvXGcJQ8VAy33mc+vzPGcZxLIgwX q2yZOpCffC9Se4GvPycKUR3HSCmJ3Vxp4mbjbB/IgUxtJ+d+SDA/C1XPX0VesbKZjg42 MRtA== 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 i1si1545972pfj.61.2018.02.14.12.11.55; Wed, 14 Feb 2018 12:12:10 -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 S1162141AbeBNSbj (ORCPT + 99 others); Wed, 14 Feb 2018 13:31:39 -0500 Received: from mga05.intel.com ([192.55.52.43]:56498 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161897AbeBNSbh (ORCPT ); Wed, 14 Feb 2018 13:31:37 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Feb 2018 10:31:37 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,513,1511856000"; d="scan'208";a="34704868" Received: from rchatre-mobl.amr.corp.intel.com (HELO [10.24.14.131]) ([10.24.14.131]) by orsmga002.jf.intel.com with ESMTP; 14 Feb 2018 10:31:36 -0800 Subject: Re: [RFC PATCH V2 00/22] Intel(R) Resource Director Technology Cache Pseudo-Locking enabling To: Mike Kravetz , tglx@linutronix.de, fenghua.yu@intel.com, tony.luck@intel.com Cc: gavin.hindman@intel.com, vikas.shivappa@linux.intel.com, dave.hansen@intel.com, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Andrew Morton , Michal Hocko , Vlastimil Babka References: From: Reinette Chatre Message-ID: <29d1be82-9fc8-ecde-a5ee-4eafc92e39f1@intel.com> Date: Wed, 14 Feb 2018 10:31:36 -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: 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/14/2018 10:12 AM, Mike Kravetz wrote: > On 02/13/2018 07:46 AM, Reinette Chatre wrote: >> Adding MM maintainers to v2 to share the new MM change (patch 21/22) that >> enables large contiguous regions that was created to support large Cache >> Pseudo-Locked regions (patch 22/22). This week MM team received another >> proposal to support large contiguous allocations ("[RFC PATCH 0/3] >> Interface for higher order contiguous allocations" at >> http://lkml.kernel.org/r/20180212222056.9735-1-mike.kravetz@oracle.com). >> I have not yet tested with this new proposal but it does seem appropriate >> and I should be able to rework patch 22 from this series on top of that if >> it is accepted instead of what I have in patch 21 of this series. >> > > Well, I certainly would prefer the adoption and use of a more general > purpose interface rather than exposing alloc_gigantic_page(). > > Both the interface I suggested and alloc_gigantic_page end up calling > alloc_contig_range(). I have not looked at your entire patch series, but > do be aware that in its present form alloc_contig_range will run into > issues if called by two threads simultaneously for the same page range. > Calling alloc_gigantic_page without some form of synchronization will > expose this issue. Currently this is handled by hugetlb_lock for all > users of alloc_gigantic_page. If you simply expose alloc_gigantic_page > without any type of synchronization, you may run into issues. The first > patch in my RFC "mm: make start_isolate_page_range() fail if already > isolated" should handle this situation IF we decide to expose > alloc_gigantic_page (which I do not suggest). My work depends on the ability to create large contiguous regions, creating these large regions is not the goal in itself. Certainly I would want to use the most appropriate mechanism and I would gladly modify my work to do so. I do not insist on using alloc_gigantic_page(). Now that I am aware of your RFC I started the process to convert to the new find_alloc_contig_pages(). I did not do so earlier because it was not available when I prepared this work for submission. I plan to respond to your RFC when my testing is complete but please give me a few days to do so. Could you please also cc me if you do send out any new versions? Thank you very much! Reinette