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=-10.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, 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 19970C49EA5 for ; Thu, 24 Jun 2021 10:26:50 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id AA98561248 for ; Thu, 24 Jun 2021 10:26:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AA98561248 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 8E6528D0003; Thu, 24 Jun 2021 06:26:48 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8C0956B0070; Thu, 24 Jun 2021 06:26:48 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6E92B8D0003; Thu, 24 Jun 2021 06:26:48 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0069.hostedemail.com [216.40.44.69]) by kanga.kvack.org (Postfix) with ESMTP id 3CE256B006C for ; Thu, 24 Jun 2021 06:26:48 -0400 (EDT) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 63387181AF5C3 for ; Thu, 24 Jun 2021 10:26:48 +0000 (UTC) X-FDA: 78288238896.28.A06379C Received: from mail-qv1-f45.google.com (mail-qv1-f45.google.com [209.85.219.45]) by imf11.hostedemail.com (Postfix) with ESMTP id 21B402000BEF for ; Thu, 24 Jun 2021 10:26:48 +0000 (UTC) Received: by mail-qv1-f45.google.com with SMTP id j6so2399824qvp.3 for ; Thu, 24 Jun 2021 03:26:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to; bh=KxS5ydGPGSrGpr8bpknASMX+EaA4On+/9KPX0g5P9o0=; b=Y46p3HJAOO0UApSgTJ/BNEu/h3xZ7r0dnW0ioPlm8N1OmHoyiMf7/up+Bymi3gAwsO ZIwwsCtsmaez9PhsLYnyEzQvlA6dy2S5O+WWRIEO7iBsrt3xhqMmOkRysQOzVRafR7+s DmfoZhzALS5JTyeGFw70a1QQqWdjy58RQJUoim9iBDisO2WVxX29QErw9GRZBiE5DZwM ZsFOiR5oRRVAhy+M0WwF8EG3wj2ZKckxbWjgiQzElBAKYlmdYKc4wJ9knJH5Z7o9JaaY jNSOLSnuMQTx8UUhLDYG5GIgi19wkZR/tPa8AwXJOxF9d+igaxCPYc/eIvc7mQOLeBZg utbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to; bh=KxS5ydGPGSrGpr8bpknASMX+EaA4On+/9KPX0g5P9o0=; b=WSS7JlU2+uRrFfAP1Wr6bttv5QSH2/P1/GCpSh98Ro06ht1zvBArNI17Lr3XYZ3+JY 6hMzUf/Eyu9bHMeUh1A51QO0ECLk3zs5/M7GuxLWC2FU2hpakbStLNMD9jV5rv+Y/Jz+ osqIefm03KfiCPx2OEXAgJ7inoVsdOMa8irq57AM/YeoWvU2xviV+9g9s2BcPv99Apzs ogpj3Vyqvy/+YP4VOISVs1oO8UzC6A5u4d7bP5wtnyBEUzZv86UK6kvxCuy6SSX6ZnNO AYVuEpVMp3eAt9JfrNNyTB6zkrx2jIv21qABkK9C9n+nuSR215Z8jREihF42fuWw9a+6 0sAQ== X-Gm-Message-State: AOAM533kaj5OpFA86ax213m0aYns090ieVLx1+KmUbJAsCdzTUSAnYCa 3RfmnPTs4Z+VcY59Yuf2+eA= X-Google-Smtp-Source: ABdhPJzz84D03CiKPqZ8W17GBXg5Z7jOn2ynPlYRpZuazv6R5do/6ygSamxJ9F3m5NSnGJ2w4NPLzA== X-Received: by 2002:a05:6214:15c2:: with SMTP id p2mr4674594qvz.8.1624530407601; Thu, 24 Jun 2021 03:26:47 -0700 (PDT) Received: from localhost.localdomain (ec2-35-169-212-159.compute-1.amazonaws.com. [35.169.212.159]) by smtp.gmail.com with ESMTPSA id w195sm2132842qkb.127.2021.06.24.03.26.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Jun 2021 03:26:47 -0700 (PDT) From: SeongJae Park X-Google-Original-From: SeongJae Park To: Shakeel Butt Cc: SeongJae Park , SeongJae Park , Jonathan.Cameron@huawei.com, acme@kernel.org, alexander.shishkin@linux.intel.com, amit@kernel.org, benh@kernel.crashing.org, Brendan Higgins , Jonathan Corbet , David Hildenbrand , dwmw@amazon.com, Marco Elver , "Du, Fan" , foersleo@amazon.de, greg@kroah.com, Greg Thelen , guoju.fgj@alibaba-inc.com, jgowans@amazon.com, Mel Gorman , mheyne@amazon.de, Minchan Kim , Ingo Molnar , namhyung@kernel.org, "Peter Zijlstra (Intel)" , Rik van Riel , David Rientjes , Steven Rostedt , Mike Rapoport , Shuah Khan , sieberf@amazon.com, snu@zelle79.org, Vlastimil Babka , Vladimir Davydov , zgf574564920@gmail.com, linux-damon@amazon.com, Linux MM , linux-doc@vger.kernel.org, LKML Subject: Re: [PATCH v31 08/13] mm/damon/dbgfs: Export kdamond pid to the user space Date: Thu, 24 Jun 2021 10:26:23 +0000 Message-Id: <20210624102623.24563-5-sjpark@amazon.de> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210624102623.24563-1-sjpark@amazon.de> References: <20210624102623.24563-1-sjpark@amazon.de> In-Reply-To: X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 21B402000BEF X-Stat-Signature: 43knu7oj77kor973xuxpafp518y7faf7 Authentication-Results: imf11.hostedemail.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=Y46p3HJA; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf11.hostedemail.com: domain of sj38park@gmail.com designates 209.85.219.45 as permitted sender) smtp.mailfrom=sj38park@gmail.com X-HE-Tag: 1624530408-368847 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 On Tue, 22 Jun 2021 11:23:12 -0700 Shakeel Butt wrote: > On Mon, Jun 21, 2021 at 1:31 AM SeongJae Park wrote: > > > > From: SeongJae Park > > > > For CPU usage accounting, knowing pid of the monitoring thread could be > > helpful. For example, users could use cpuaccount cgroups with the pid. > > > > This commit therefore exports the pid of currently running monitoring > > thread to the user space via 'kdamond_pid' file in the debugfs > > directory. > > > > Signed-off-by: SeongJae Park > > Reviewed-by: Fernand Sieber > > --- > > [...] > > > > > +static const struct file_operations kdamond_pid_fops = { > > + .owner = THIS_MODULE, > > I don't think you need to set the owner (and for other fops) as these > files are built into modules. Otherwise it looks good. Good point. Will remove those from the next spin. Thanks, SeongJae Park