Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp86157pxv; Thu, 24 Jun 2021 03:28:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwXw5Hk1vziGizKshwJcGDd2CZWI138bk8sMv1rsLburRwyA1gVQICGj6c+/4fslnbGgg2X X-Received: by 2002:a05:6602:1243:: with SMTP id o3mr3535038iou.13.1624530522331; Thu, 24 Jun 2021 03:28:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624530522; cv=none; d=google.com; s=arc-20160816; b=PC76MnTZmBPiBYu7Zobc2HCY8bybvWWmTiJAXx10/pkp8gwdpz0CHmB8oGf0fFYm+p sEJ4IT2nLne8+NOfLtn14hzZqXlVKxS50YI0YT8HBAN2nsN2XQ2d6kRcu/aV/ws+unzu zEElv8uH6MwATe1kZGSTyfHR8p+pLjyRY2KB4yLRpU7K6LPBY5Ts+zZwhb9UD14C8BKs /RSNncRSVCFgGcH4Okm4+SHFQLrFvni4hW9g4Pa+t0BCaaErVN+eicg3Wv0l/ZHAKZmZ xW2r4YIBipV2LiV1swhyaZ4YTaj4HBfCxKk8ClX4qje62Dwnd/bbV2yH6kzNoe7Bd1mK oZjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=KxS5ydGPGSrGpr8bpknASMX+EaA4On+/9KPX0g5P9o0=; b=iM/dL2DVnE4Cd6WmqZFXGaI2X61US4BB7AlkjcpZdBNbpY2DkpHt4RbJScy4X+dIVx e/MtLq2tdPKnz4Lk/9cPAKtCgHX3/jyWJVUOq5gBX6qRI5IWVfwkuM91aFhp7MBTrvNC Io+9IY0xu2QNJYhCY11FOyFUorvPNv9PRhAvAQwc8frQ4oytJIPwgNKBbofNMBFPBNSy ZPfudTMvzCOw1Nu/gzlT76qEV1buQFLrTYh6sGCg1cxpX0oH4l7DZZLU+9LawC3+ZVxy Gflw0qqT/ICou6d8MghDHRPDBuMyijVBPSldAFjh51xOSEW7RA8lbKvJEL9X2Rsk0eE5 GrdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Y46p3HJA; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t5si3090142ilu.154.2021.06.24.03.28.30; Thu, 24 Jun 2021 03:28:42 -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=@gmail.com header.s=20161025 header.b=Y46p3HJA; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232261AbhFXK3N (ORCPT + 99 others); Thu, 24 Jun 2021 06:29:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232228AbhFXK3I (ORCPT ); Thu, 24 Jun 2021 06:29:08 -0400 Received: from mail-qv1-xf30.google.com (mail-qv1-xf30.google.com [IPv6:2607:f8b0:4864:20::f30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5522FC061574; Thu, 24 Jun 2021 03:26:48 -0700 (PDT) Received: by mail-qv1-xf30.google.com with SMTP id f16so2997488qvs.7; Thu, 24 Jun 2021 03:26:48 -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=DM2kobYEjYmJtWhupmCxwYCE6No7mahI45Mvi3s4vOrAJ1q4dk41sdc7rcLEQ6PbFB T/rsK6uNEY0srKuv9ggyX2UU3/O5z9iW5ebIxvPmERsrCBPWT5UndDiI98FXO34BfSuK jHcbWuX+/botOz421Qv7xQLaSHTxaXOUmdnNctEmR1ZvteiNCKCjpeE7+1HSwQDeQUN0 aXgnWzrte7o/DmFaKaot1gFlLr0dONNCQsrVVmAsT1zxrJC+TYrVisaDnJbIFa9WmEOh +gSh7ByD+oDkqkEUTtCUFKUrXbhwSQ7AT0rZOKgJ0/QQnj7yxwRv8BSMIC5gkpmZbxK8 hZlw== X-Gm-Message-State: AOAM530Gi/EqSsX20cIA2hlyN4Sd0oN/eFyKQG15G22vLlevBdEXi42M xPI1GYUnsuO/e0o/BkPzfxM= 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: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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