Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2480345ybt; Tue, 16 Jun 2020 07:13:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwIsiMUcnMQ6x/SIpc9PcUvfNzx39XEQ7vkQzJn8nwFG4sI6MTAPeW/3kkUM0t2K3sXHxvU X-Received: by 2002:a17:907:4240:: with SMTP id oi24mr2891107ejb.127.1592316835040; Tue, 16 Jun 2020 07:13:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592316835; cv=none; d=google.com; s=arc-20160816; b=B4992wQEBgSu50+Dcr+e/s2sRIUjxc/nxqjtsOvsoQ9dttfYFhMoo12CeK0Nf54Deo LxGC/jRMkGKVqRYjtQVuVWyJ5G20tNVGuSRtXv5eAUQZ6w1ajAfB3y760XxOX7GmtnOu htI/gXOxPBSh9VQQ8vVnSgMJHoDuEf2rlRmp3LChZWCOglpOfm2BON09GLcGVM6Ts/tG y4tU2csWxrqJNNKuN+IMUpV1CXq+clDyP6sez6+NBG+C99a1uJuCpGKFhXcmlb8oNbKU k1xByJYzEYrNPRd6W5fiMw0+b0xEvZgoRWbZMEZP4cRyzMTl+zab33I2X3E97qyuJEHA rqTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:ironport-sdr:dkim-signature; bh=3cn2fFarr9khrJLb1VKOUd3GG4bZbVaq3DfkaSlwmdw=; b=Any7gPaGL2BZ9F4bEj0mg9bvaCB5zTIRzumLsNGD7Pr/y6OZu6rgU+XItihiYASV0U pngmTmKC/aJbm58QFxTUkU+/vrIUf1OeX6PqAMW4zFT67Euw88WxHTJfofUuPbgc2A+8 nnkMxMA+ijcXAPIUqfl3oDcHKyjrPcqUosrCTfFVoVjEIbpdpgepXK/EhL/4428vjsLG J4BuMxoAQQlADZ08Qeg+D9qTQzRhrb/Vu/z6XvrSv2UD1Tf7X587/iGl+4xMEFnkQfUr rVybQ9IoxQi52n3m/z+/6bFNOHEGqOgpuFHNH9h3jVKrd4cMTHnGstIFj7zptXTW4xzx oFUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=ayexdK7d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h18si11222039eja.48.2020.06.16.07.13.32; Tue, 16 Jun 2020 07:13:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=ayexdK7d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729616AbgFPOKr (ORCPT + 99 others); Tue, 16 Jun 2020 10:10:47 -0400 Received: from smtp-fw-9101.amazon.com ([207.171.184.25]:38173 "EHLO smtp-fw-9101.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727966AbgFPOKq (ORCPT ); Tue, 16 Jun 2020 10:10:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1592316646; x=1623852646; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=3cn2fFarr9khrJLb1VKOUd3GG4bZbVaq3DfkaSlwmdw=; b=ayexdK7dSGn/hXiga/1IQTDv1M8qQoJQwc8xVWF5TLD6odpFbM66kAqf xukoUFjnGxHRPUFFvU6oZUrjnmsIKZ/a7aPmHb9Yta4aAoyDfYUcQNJPq o/R2NdcEcOEGA0yqRQz0WtLTREJHiqaTrDbZDNZWcTZAYPTx/53QNgwUb o=; IronPort-SDR: d7geXE5AZCSZJVyrFYYCm5XYhbOsS/Anr/LD81kfq05PEFkRq4zbhEJsEXM3VLSoqELAezkFwx A+uMxQLHT95A== X-IronPort-AV: E=Sophos;i="5.73,518,1583193600"; d="scan'208";a="44413840" Received: from sea32-co-svc-lb4-vlan3.sea.corp.amazon.com (HELO email-inbound-relay-2a-d0be17ee.us-west-2.amazon.com) ([10.47.23.38]) by smtp-border-fw-out-9101.sea19.amazon.com with ESMTP; 16 Jun 2020 14:10:41 +0000 Received: from EX13MTAUEA002.ant.amazon.com (pdx4-ws-svc-p6-lb7-vlan3.pdx.amazon.com [10.170.41.166]) by email-inbound-relay-2a-d0be17ee.us-west-2.amazon.com (Postfix) with ESMTPS id BB7DCA24E9; Tue, 16 Jun 2020 14:10:39 +0000 (UTC) Received: from EX13D31EUA001.ant.amazon.com (10.43.165.15) by EX13MTAUEA002.ant.amazon.com (10.43.61.77) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 16 Jun 2020 14:10:39 +0000 Received: from u886c93fd17d25d.ant.amazon.com (10.43.162.109) by EX13D31EUA001.ant.amazon.com (10.43.165.15) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 16 Jun 2020 14:10:19 +0000 From: SeongJae Park To: CC: SeongJae Park , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [RFC v4 4/8] mm/rmap: Export essential functions for rmap_run Date: Tue, 16 Jun 2020 16:08:09 +0200 Message-ID: <20200616140813.17863-5-sjpark@amazon.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200616140813.17863-1-sjpark@amazon.com> References: <20200616140813.17863-1-sjpark@amazon.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.43.162.109] X-ClientProxiedBy: EX13D01UWB004.ant.amazon.com (10.43.161.157) To EX13D31EUA001.ant.amazon.com (10.43.165.15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: SeongJae Park This commit exports the three essential functions for ramp walk, 'page_lock_anon_vma_read()', 'rmap_walk()', and 'page_rmapping()', to GPL modules. Those will be used by DAMON for the physical memory address based access monitoring in the following commit. Signed-off-by: SeongJae Park --- mm/rmap.c | 2 ++ mm/util.c | 1 + 2 files changed, 3 insertions(+) diff --git a/mm/rmap.c b/mm/rmap.c index f79a206b271a..20ac37b27a7d 100644 --- a/mm/rmap.c +++ b/mm/rmap.c @@ -579,6 +579,7 @@ struct anon_vma *page_lock_anon_vma_read(struct page *page) rcu_read_unlock(); return anon_vma; } +EXPORT_SYMBOL_GPL(page_lock_anon_vma_read); void page_unlock_anon_vma_read(struct anon_vma *anon_vma) { @@ -1934,6 +1935,7 @@ void rmap_walk(struct page *page, struct rmap_walk_control *rwc) else rmap_walk_file(page, rwc, false); } +EXPORT_SYMBOL_GPL(rmap_walk); /* Like rmap_walk, but caller holds relevant rmap lock */ void rmap_walk_locked(struct page *page, struct rmap_walk_control *rwc) diff --git a/mm/util.c b/mm/util.c index 988d11e6c17c..1df32546fe28 100644 --- a/mm/util.c +++ b/mm/util.c @@ -620,6 +620,7 @@ void *page_rmapping(struct page *page) page = compound_head(page); return __page_rmapping(page); } +EXPORT_SYMBOL_GPL(page_rmapping); /* * Return true if this page is mapped into pagetables. -- 2.17.1