Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1102069ybt; Tue, 7 Jul 2020 07:52:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7AMWt0ss3BZGqMIv0Q3Xmm9PE8DvDHDVHw7Subm/M4PD+oAln7TeFqQKA92YiMsrEil8A X-Received: by 2002:a50:ab53:: with SMTP id t19mr62785409edc.179.1594133533964; Tue, 07 Jul 2020 07:52:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594133533; cv=none; d=google.com; s=arc-20160816; b=SmLmBPbStinYk9DPT2cad2wpNEkBdOPEzP+/z7buAC3W+S6ZEE7+o9alTGzJ5XLsWf ox108DAFeHwEI4BuCfJ/L4VP+BEv8mzAjlgK5iFcHF6X2oPGgRxqTLLS1CROYG3O9WBN hLaNxq2pR0WwPKp61Hmnr5Ek70OehWiEnR2+neeWKusowFwamQVAK+MmqJnIfq5GuDTd O0K8V/xcY5piePtIMSHdCcfyFkcLJbmJxnjhz7WA3hQj701vAWr9BYfeAb+NuSdb1aw5 a53lX8NAD4uXn6Mm2X4JBPNuGcF9wje7hxuP6FDwRufUzklm4x80a/XofyZSLnHqK9F8 7V7Q== 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=k+ENYbjLXSg5uOLR7OefcbtieXJsz5lZDRTS65qQ7rDA6n9fGDk/GlcUQuvy2QRYje JN47jePN13femFh6PXUytZz9IslC7IfPaGJSIwbopnIM1bwJJRsPFcszHVG4rVn+4OHn //Bhy4V0BdJLMD5OHjYuf2IiaYBibMSZKS4RK7bxT58SpUPJpnLjgXLqJmAxQUCPoRcx PtV3rPaO90QJ5AoZvtddX6Ls9XEqtaEbw9wFjw5HIabhy6ukIngmt75DPo6WhR0UGESb HHIE/RIVHtWH/w5l5aTu5i7IxOHdor/FSl50z64xGhxJ53TPoAacsMYV6V4qBqXxFKoP ODzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.com header.s=amazon201209 header.b=GCewutXo; 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 d23si15042955ejz.145.2020.07.07.07.51.50; Tue, 07 Jul 2020 07:52:13 -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=GCewutXo; 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 S1728300AbgGGOsw (ORCPT + 99 others); Tue, 7 Jul 2020 10:48:52 -0400 Received: from smtp-fw-2101.amazon.com ([72.21.196.25]:14570 "EHLO smtp-fw-2101.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726946AbgGGOsw (ORCPT ); Tue, 7 Jul 2020 10:48:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1594133332; x=1625669332; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=3cn2fFarr9khrJLb1VKOUd3GG4bZbVaq3DfkaSlwmdw=; b=GCewutXoKiR4F/r7TbAcVB6A5LSxu6hYuF2eMegjnc7jcEcBRG5zGklu kcqd0XQMp/f4O+MYjXCNquPS0S2MWEU8m2DdLqaNB+wFDe0mTiV6cUA9m JhL23JcQQof7khVlJ25F03jHIUg6xN5UTGfqoYwHFlU1fGrzHYkNfPKMm Y=; IronPort-SDR: Sxvg+RtMv0jpRvxACUOU6MEBwmFu+8toIb29UzNpVQeVvSzZZzxcIehKDCDSbdW0CHuAs0dDIC ywzlBB6RzJdA== X-IronPort-AV: E=Sophos;i="5.75,324,1589241600"; d="scan'208";a="40470231" Received: from iad12-co-svc-p1-lb1-vlan2.amazon.com (HELO email-inbound-relay-2a-53356bf6.us-west-2.amazon.com) ([10.43.8.2]) by smtp-border-fw-out-2101.iad2.amazon.com with ESMTP; 07 Jul 2020 14:48:44 +0000 Received: from EX13MTAUEA002.ant.amazon.com (pdx4-ws-svc-p6-lb7-vlan2.pdx.amazon.com [10.170.41.162]) by email-inbound-relay-2a-53356bf6.us-west-2.amazon.com (Postfix) with ESMTPS id 5586BA0628; Tue, 7 Jul 2020 14:48:41 +0000 (UTC) Received: from EX13D31EUA004.ant.amazon.com (10.43.165.161) by EX13MTAUEA002.ant.amazon.com (10.43.61.77) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 7 Jul 2020 14:48:40 +0000 Received: from u886c93fd17d25d.ant.amazon.com (10.43.161.214) by EX13D31EUA004.ant.amazon.com (10.43.165.161) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 7 Jul 2020 14:48:24 +0000 From: SeongJae Park To: CC: SeongJae Park , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , Subject: [RFC v5 06/11] mm/rmap: Export essential functions for rmap_run Date: Tue, 7 Jul 2020 16:45:35 +0200 Message-ID: <20200707144540.21216-7-sjpark@amazon.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200707144540.21216-1-sjpark@amazon.com> References: <20200707144540.21216-1-sjpark@amazon.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.43.161.214] X-ClientProxiedBy: EX13D35UWC001.ant.amazon.com (10.43.162.197) To EX13D31EUA004.ant.amazon.com (10.43.165.161) 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