From patchwork Wed Oct 20 09:02:59 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: haoxin X-Patchwork-Id: 12571863 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DBB6EC433F5 for ; Wed, 20 Oct 2021 09:03:15 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8CBDC61354 for ; Wed, 20 Oct 2021 09:03:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 8CBDC61354 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 22E086B0071; Wed, 20 Oct 2021 05:03:15 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 1DE17900002; Wed, 20 Oct 2021 05:03:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 0CD6A6B0073; Wed, 20 Oct 2021 05:03:15 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0056.hostedemail.com [216.40.44.56]) by kanga.kvack.org (Postfix) with ESMTP id EF1E66B0071 for ; Wed, 20 Oct 2021 05:03:14 -0400 (EDT) Received: from smtpin40.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id ABC6D181AC217 for ; Wed, 20 Oct 2021 09:03:14 +0000 (UTC) X-FDA: 78716226708.40.1C3E5F1 Received: from out4436.biz.mail.alibaba.com (out4436.biz.mail.alibaba.com [47.88.44.36]) by imf25.hostedemail.com (Postfix) with ESMTP id 71434B00018C for ; Wed, 20 Oct 2021 09:03:08 +0000 (UTC) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R141e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04407;MF=xhao@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0Ut1iyHi_1634720585; Received: from localhost.localdomain(mailfrom:xhao@linux.alibaba.com fp:SMTPD_---0Ut1iyHi_1634720585) by smtp.aliyun-inc.com(127.0.0.1); Wed, 20 Oct 2021 17:03:09 +0800 From: Xin Hao To: sjpark@amazon.de Cc: xhao@linux.alibaba.com, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH V4 0/2] mm/damon: Fix some small bugs Date: Wed, 20 Oct 2021 17:02:59 +0800 Message-Id: X-Mailer: git-send-email 2.31.0 MIME-Version: 1.0 X-Stat-Signature: n395694hs91yguwpduanasyc3gerg13i Authentication-Results: imf25.hostedemail.com; dkim=none; spf=pass (imf25.hostedemail.com: domain of xhao@linux.alibaba.com designates 47.88.44.36 as permitted sender) smtp.mailfrom=xhao@linux.alibaba.com; dmarc=pass (policy=none) header.from=alibaba.com X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 71434B00018C X-HE-Tag: 1634720588-851399 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: V3 -> V4 -- patch[1] add Reviewed-by: SeongJae Park -- patch[2] Call kfree(kbuf) before return, Fix test example in commit info. # cat /sys/kernel/debug/damon/target_ids # # echo on > /sys/kernel/debug/damon/monitor_on # damon: kdamond (5390) starts V2 -> V3 -- Fix some formatting issues -- Modify the return value of 'damon_targets_empty' to bool type V1 -> V2 -- As SeongJae Park advised, put 'ctx->adaptive_targets check' into 'dbgfs_monitor_on_write()' Xin Hao (2): mm/damon: Remove unnecessary variable initialization mm/damon/dbgfs: Add adaptive_targets list check before enable monitor_on include/linux/damon.h | 1 + mm/damon/core.c | 5 +++++ mm/damon/dbgfs.c | 15 ++++++++++++--- mm/damon/vaddr.c | 2 +- 4 files changed, 19 insertions(+), 4 deletions(-) --- 2.31.0