Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2348767ybv; Fri, 21 Feb 2020 13:54:14 -0800 (PST) X-Google-Smtp-Source: APXvYqydzryTXLAss1ZFnvFnnczZwba4mxA6CIThXd+axueIHowSEk5ulOFVFf4Ya+iFV6qSJgBe X-Received: by 2002:a05:6830:15c2:: with SMTP id j2mr13541486otr.351.1582322054351; Fri, 21 Feb 2020 13:54:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582322054; cv=none; d=google.com; s=arc-20160816; b=ZP8qk/szmhk+QTxLSPzJkJlNOL4V+9387oPtOLldAk/upYNHyxTsWRLIlNomz0uUi2 fm046NaSoWOzETXh/HO2o1pTuTQ1Bw8gREXiQ+AUudb/VCz7tbp64XW0nU3h4LjSjSBf CN/p/ENsIJl3ItnRclOrJyNZqC2DzoBQQ5cJHukOVGM+H2V/c44NWmNNwTU2yhzMal1B pyfQK6y9X7kDFSD0kOo4rRLcQf2lCRWHo6GvI4PU04SsNU4MpIf4qYgXoMiEIoCVdRuJ tBt3O0DS7uf/HNeiWyYLRbTcGJWIlPlFgrfckuFqaXhw9bo+OIuz66D3qNTQXzBpVoe/ ofpw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=49XPTl2Iq2LtV/XEpL6k7ShjZHZh3gfaZgtspQYeiEE=; b=gvAA2i0h0c0V1N4baDtkwCqpzwIiGsNmiDtHiBSMKnIcU+qAx/7BwK7kFzxaYSDuL7 CCdJla5CK5F81F13PV1tu5+9XG9ETm9dqgr8kyuRtIIP8XbCq7orLELPxlP+R8GSgxcS Mp5IHc1qoFo2XTPkPhCRw/zDxSEYk1NsYeSgIBa7WbeMIZH5jaSQMlG1wSRS+xXsmjAC HrpvDH2nZXEif3EiFApt9rLhkqVIUXpQe4yG1ctjSHfiHzMFdvtMLMD/jaa4YPGvdw1T BwCQCdG62BryTfRsEq3WK3M8IimhhrI1FCgH2jS5CieudwisTMMz1qknxYWNsapKbq+V AnSQ== 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 z199si1262675oia.192.2020.02.21.13.54.01; Fri, 21 Feb 2020 13:54:14 -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 S1728405AbgBUVxz (ORCPT + 99 others); Fri, 21 Feb 2020 16:53:55 -0500 Received: from shelob.surriel.com ([96.67.55.147]:44772 "EHLO shelob.surriel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726731AbgBUVxz (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-Ny; 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 1/2] mm,compaction,cma: add alloc_contig flag to compact_control Date: Fri, 21 Feb 2020 16:53:42 -0500 Message-Id: X-Mailer: git-send-email 2.24.1 In-Reply-To: References: 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 Add information to struct compact_control to indicate that the allocator would really like to clear out this specific part of memory, used by for example CMA. Signed-off-by: Rik van Riel --- mm/internal.h | 1 + mm/page_alloc.c | 1 + 2 files changed, 2 insertions(+) diff --git a/mm/internal.h b/mm/internal.h index 3cf20ab3ca01..78492d9815b4 100644 --- a/mm/internal.h +++ b/mm/internal.h @@ -206,6 +206,7 @@ struct compact_control { bool whole_zone; /* Whole zone should/has been scanned */ bool contended; /* Signal lock or sched contention */ bool rescan; /* Rescanning the same pageblock */ + bool alloc_contig; /* alloc_contig_range allocation */ }; /* diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 3c4eb750a199..a36736812596 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -8402,6 +8402,7 @@ int alloc_contig_range(unsigned long start, unsigned long end, .ignore_skip_hint = true, .no_set_skip_hint = true, .gfp_mask = current_gfp_context(gfp_mask), + .alloc_contig = true, }; INIT_LIST_HEAD(&cc.migratepages); -- 2.24.1