From patchwork Tue Mar 15 16:37:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: haoxin X-Patchwork-Id: 12781643 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5BE68C433F5 for ; Tue, 15 Mar 2022 16:37:17 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9402F8D0002; Tue, 15 Mar 2022 12:37:16 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8EEC18D0001; Tue, 15 Mar 2022 12:37:16 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7B7D08D0002; Tue, 15 Mar 2022 12:37:16 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.27]) by kanga.kvack.org (Postfix) with ESMTP id 6CF098D0001 for ; Tue, 15 Mar 2022 12:37:16 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 3EDAF545 for ; Tue, 15 Mar 2022 16:37:16 +0000 (UTC) X-FDA: 79247175672.13.59CDA27 Received: from out30-42.freemail.mail.aliyun.com (out30-42.freemail.mail.aliyun.com [115.124.30.42]) by imf13.hostedemail.com (Postfix) with ESMTP id 84C6620017 for ; Tue, 15 Mar 2022 16:37:14 +0000 (UTC) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R171e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04423;MF=xhao@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0V7IiZE5_1647362229; Received: from localhost.localdomain(mailfrom:xhao@linux.alibaba.com fp:SMTPD_---0V7IiZE5_1647362229) by smtp.aliyun-inc.com(127.0.0.1); Wed, 16 Mar 2022 00:37:10 +0800 From: Xin Hao To: sj@kernel.org Cc: xhao@linux.alibaba.com, rongwei.wang@linux.alibaba.com, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [RFC PATCH V1 0/3] mm/damon: Add CMA minotor support Date: Wed, 16 Mar 2022 00:37:04 +0800 Message-Id: X-Mailer: git-send-email 2.31.0 MIME-Version: 1.0 X-Rspamd-Queue-Id: 84C6620017 X-Stat-Signature: 9nzo9iuu9nrc3jnhhmxjyenue7kpa3wn X-Rspam-User: Authentication-Results: imf13.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=alibaba.com; spf=pass (imf13.hostedemail.com: domain of xhao@linux.alibaba.com designates 115.124.30.42 as permitted sender) smtp.mailfrom=xhao@linux.alibaba.com X-Rspamd-Server: rspam02 X-HE-Tag: 1647362234-155108 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000010, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: The purpose of these patches is to add CMA memory monitoring function. In some memory tight scenarios, it will be a good choice to release more memory by monitoring the CMA memory. These patches is only preliminarily for monitoring function, About the reclaim, it need to do some fixes base on "reclaim.c" and more tests, I will implement it in the next patch series. Xin Hao (3): mm/damon: rename damon_evenly_split_region() mm/damon/paddr: Move "paddr" relative func to ops-common.c file mm/damon/sysfs: Add CMA memory monitoring include/linux/damon.h | 1 + mm/damon/Makefile | 2 +- mm/damon/ops-common.c | 286 ++++++++++++++++++++++++++++++++++++++++++ mm/damon/ops-common.h | 18 +++ mm/damon/paddr-cma.c | 104 +++++++++++++++ mm/damon/paddr.c | 246 ------------------------------------ mm/damon/sysfs.c | 1 + mm/damon/vaddr-test.h | 6 +- mm/damon/vaddr.c | 41 +----- 9 files changed, 415 insertions(+), 290 deletions(-) create mode 100644 mm/damon/paddr-cma.c --- 2.27.0