Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp2085948ybf; Mon, 2 Mar 2020 01:33:46 -0800 (PST) X-Google-Smtp-Source: APXvYqygeukzIGoAE2l6bfWphcIqkxRmAdbKGm8wVQ7J5dE8VWe+3gC4B47m0EM+9Ze6hEj1bXD4 X-Received: by 2002:a05:6808:2cd:: with SMTP id a13mr11022078oid.82.1583141626727; Mon, 02 Mar 2020 01:33:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583141626; cv=none; d=google.com; s=arc-20160816; b=XCemD3nH5UOer6kDeqHY8FXIsbzKRbBAUPrnxb7wpN+f79vxx9S8NL8Mq1xx4OWTIL hsf6WNBj8MmsQKmBe+H7oi1Q3563T3fnIj9Ljv41KIDjjvyZBXlOGfwc0KjS4nea9qNG j4qMaBNFHrZ7AlbbBDIutqBhFLk9SxEbbHH6kLa6fWJ+amMKO7jF6DKkixFYKQvoUjK3 MKrryY0PzDgI47c1rqNJBoP5XBEyIptbArNjQ7rNXYTSKs8ixmG5MVaKUcN/mJzGA3xn XIYuPoHqjxoqdOSV87qQNHTu9nGllMG7SKbn6nO46DuwXEqbU/ZcPm3qaM+3N+GEBh82 34mQ== 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; bh=MRjDCPDm7x+NH5nL0R6S4EOZhO7V7jKqqqPYSPX9DWI=; b=XeOFmyvYAj3WX/APZ+9Gbg5KWrpXRgs0dqcEz4xsAaEP4m5ND5/c+pxZJ0k9VgB57C bk8VGh4VmszR5WzR2kgcu25xjd9N2yqUQQePUfIeDe10+5XnqCRZYtGAkDAC2YyUVmQA 2KiYkcDBDMyBp6tnJRUjEcahRVkFPCJajOYMGtNPkCix/+Ea3rC1VOpYQYVbxE8mfPF8 pz/0bIs95Z+xUw8HUaxryihXqo2MFZ6IZgYyWZHc2utXb707+Zbt1ngZh4NXriG/Z1b5 xmS7FxIVubfYU5J0LLEDZiCnbmnzuXwQ/CjvGr4+1vNAxAns0Cz9YL4hYE6KqasKSyRt QpHg== 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 w9si6292680otl.138.2020.03.02.01.33.34; Mon, 02 Mar 2020 01:33:46 -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 S1727130AbgCBJc5 (ORCPT + 99 others); Mon, 2 Mar 2020 04:32:57 -0500 Received: from mx2.suse.de ([195.135.220.15]:34010 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726382AbgCBJc5 (ORCPT ); Mon, 2 Mar 2020 04:32:57 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id B2149B01D; Mon, 2 Mar 2020 09:32:55 +0000 (UTC) Subject: Re: [PATCH v2 2/2] mm,thp,compaction,cma: allow THP migration for CMA allocations To: Rik van Riel , linux-kernel@vger.kernel.org Cc: kernel-team@fb.com, akpm@linux-foundation.org, linux-mm@kvack.org, mhocko@kernel.org, mgorman@techsingularity.net, rientjes@google.com, aarcange@redhat.com, ziy@nvidia.com References: <20200227213238.1298752-2-riel@surriel.com> From: Vlastimil Babka Message-ID: Date: Mon, 2 Mar 2020 10:32:54 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <20200227213238.1298752-2-riel@surriel.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 On 2/27/20 10:32 PM, Rik van Riel wrote: > The code to implement THP migrations already exists, and the code > for CMA to clear out a region of memory already exists. > > Only a few small tweaks are needed to allow CMA to move THP memory > when attempting an allocation from alloc_contig_range. > > With these changes, migrating THPs from a CMA area works when > allocating a 1GB hugepage from CMA memory. > > Signed-off-by: Rik van Riel > Reviewed-by: Zi Yan With the followup fix, Reviewed-by: Vlastimil Babka Thanks.