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 C843CC48BDF for ; Thu, 24 Jun 2021 10:26:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AC09A613FE for ; Thu, 24 Jun 2021 10:26:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232156AbhFXK3K (ORCPT ); Thu, 24 Jun 2021 06:29:10 -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-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: Precedence: bulk List-ID: X-Mailing-List: linux-doc@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