Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2348806ybv; Fri, 21 Feb 2020 13:54:18 -0800 (PST) X-Google-Smtp-Source: APXvYqyfKna+gE9y8fl1AAkK6F84nemPdPiyTmSn7LRyhkHaphndWemNoeBCU/ooeyXqIpdoUF1L X-Received: by 2002:a05:6808:3ae:: with SMTP id n14mr3877658oie.63.1582322058848; Fri, 21 Feb 2020 13:54:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582322058; cv=none; d=google.com; s=arc-20160816; b=g9GkteiMb0BhIROEL5RshduHveri92zZV7MF3lepZ1FYI+kXPvzvAtHajKeZJyZ7mi lq0rhMXGyFct5UAnmQVG9wGJJYLOXDga5rTusH6oFtoLLGuT4UwdbCeVzBwN4cogOWqb tXZSD+wF386kjMXw4MtZsEG2u0/eVs/J93pDmYr12kQLIRe4zziYREXZIczl4PbzU3NO LSB8OkD3nKSYBdeY4edisAWflufvRZKNjx1aESzuzFNnyJJ+gaNmbh89ffBgefcJBvR3 fby9QdcyDNOna4vIuxHUcmdj43QfW8rd5nPLNRo5N46KamIc17sb7CSe+yMxLgPx1u+9 FrQw== 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:mime-version :message-id:date:subject:cc:to:from; bh=fDmxA6BfkV+UXes44VihAdoZ30Rd5lLJp2nrgccsKjI=; b=ZHavuBFs7480CTwOkKPW7t6uWvNRmiSKL/JtMG7ezgUw/gt37ocWz0/bJvNOc6JQRo G94pzpub+3kxztVCVAhToHKlcsBBO7oRryDWTV2PIhoVdtTQ2wEv8KfZpSxG1EDS/M16 bkL9QJtUycnkYb7zkk1v9pCBKmVeUdfuP+7lc7PdR5jZLpgG9zP0zDNsrPBquuCe5jMp xUUvg6G2PwbNLEAGimV5cFrX8fVHgPXj3dWAjKrGeVV1R8KgLHUfvplQ3+IVLBThnw5j eRfGGcSylfI+EK/d+81vhmS1ZE4JSmr0U9Xfh9JK9RVkw82AXbOdHUR7bW55yLdn8ICB F6uw== 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 x2si1370508oie.56.2020.02.21.13.54.07; Fri, 21 Feb 2020 13:54:18 -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 S1727998AbgBUVxz (ORCPT + 99 others); Fri, 21 Feb 2020 16:53:55 -0500 Received: from shelob.surriel.com ([96.67.55.147]:44728 "EHLO shelob.surriel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726683AbgBUVxz (ORCPT ); Fri, 21 Feb 2020 16:53:55 -0500 Received: from imladris.surriel.com ([96.67.55.152]) by shelob.surriel.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) (envelope-from ) id 1j5GF1-0002PL-M7; Fri, 21 Feb 2020 16:53:47 -0500 From: Rik van Riel To: linux-kernel@vger.kernel.org, riel@fb.com Cc: kernel-team@fb.com, akpm@linux-foundation.org, linux-mm@kvack.org, mhocko@kernel.org, vbabka@suse.cz, mgorman@techsingularity.net, rientjes@google.com, aarcange@redhat.com, Rik van Riel Subject: [PATCH 0/2] fix THP migration for CMA allocations Date: Fri, 21 Feb 2020 16:53:41 -0500 Message-Id: X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Transparent huge pages are allocated with __GFP_MOVABLE, and can end up in CMA memory blocks. Transparent huge pages also have most of the infrastructure in place to allow migration. However, a few pieces were missing, causing THP migration to fail when attempting to use CMA to allocate 1GB hugepages. With these patches in place, THP migration from CMA blocks seems to work, both for anonymous THPs and for tmpfs/shmem THPs. Rik van Riel (2): mm,compaction,cma: add alloc_contig flag to compact_control mm,thp,compaction,cma: allow THP migration for CMA allocations mm/compaction.c | 16 +++++++++------- mm/internal.h | 1 + mm/page_alloc.c | 7 +++++-- 3 files changed, 15 insertions(+), 9 deletions(-) -- 2.24.1