From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.9 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B1503C433E2 for ; Tue, 16 Jun 2020 14:11:27 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7B5B120707 for ; Tue, 16 Jun 2020 14:11:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=amazon.com header.i=@amazon.com header.b="MtlojCoQ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7B5B120707 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=amazon.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 00DC68D0009; Tue, 16 Jun 2020 10:11:27 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F00848D0006; Tue, 16 Jun 2020 10:11:26 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DC7E88D0009; Tue, 16 Jun 2020 10:11:26 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0036.hostedemail.com [216.40.44.36]) by kanga.kvack.org (Postfix) with ESMTP id C2CBC8D0006 for ; Tue, 16 Jun 2020 10:11:26 -0400 (EDT) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 86055801BDCE for ; Tue, 16 Jun 2020 14:11:26 +0000 (UTC) X-FDA: 76935262572.28.word08_420463f26dff Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin28.hostedemail.com (Postfix) with ESMTP id 3207CBBB5B for ; Tue, 16 Jun 2020 14:10:47 +0000 (UTC) X-HE-Tag: word08_420463f26dff X-Filterd-Recvd-Size: 4738 Received: from smtp-fw-9101.amazon.com (smtp-fw-9101.amazon.com [207.171.184.25]) by imf06.hostedemail.com (Postfix) with ESMTP for ; Tue, 16 Jun 2020 14:10:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1592316647; x=1623852647; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=3cn2fFarr9khrJLb1VKOUd3GG4bZbVaq3DfkaSlwmdw=; b=MtlojCoQJ7Pn9Asmwqyti9+bhSorIG7xdgopjrf75iPIL9tFsM7SbppD zkcNbzUP5uSY+NPsl1QU4JY13y2mQAnX7hy4QBUNRMXX5tc5jKNrrFgqN YELigW5TlmF9nHLcwlvSjyGQSEitGogpZnIFtYTwBfNfDnzbn9cujzAQ3 k=; 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) X-Rspamd-Queue-Id: 3207CBBB5B X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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