Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4945965pxj; Tue, 22 Jun 2021 11:25:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGAkDq/yMSzzmYb5Uen/Xkt2D7n3e5+SJDqHxj6fD6RJBGAxhQ+++SoJ9m3cGK/A42uLTK X-Received: by 2002:aa7:d856:: with SMTP id f22mr7078629eds.250.1624386300747; Tue, 22 Jun 2021 11:25:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1624386300; cv=none; d=google.com; s=arc-20160816; b=xKyE5e9lU/0Cbl84yW9vjlzoXp+NQDncrzGvetWOkoY6x+tPFIjbo+7xlPRUnl0Kxy X3WkTnHKBOvJytrkygFgKcp7Gf/flVO56arMEOb/SaTp1VEs9yH64Br+ULSWwFpXnHlR DUldBAFSzddL/0hzhQ3eXeQLmS0migf/04j1Kd00oW8eeiy0WBv31lVyu6A6dnbwDgwV Hvuzaixrz4lUdXSub+rpxsQD2M7FsK9IYXpiFzjB0rfSxElMDjAckfVQLWL+eDOEKi4t Cig5wf1wn8qvgeJIQf7DLyisac1hpnH73DvDJzsu57xj6UjbWE809Bokv3rGpYS6UzmH 735A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=FV61UP5NcLLWWDvVqg5arfYv7gGM3LSFINIkuHzruNQ=; b=kK1WAenuOpelRD2o1zGPBn03nCuGDnCnsDFr41offXhYXUuKm6nfCFmFqQREX4oNu2 IzoYoiJLdslDbYmwcdXNrQK/PMW/LBh0vrKZkkVxzsNGPUsThv/euvCMmRI2jPtMeq8T 3A15W9EMQitzU9yFx655XL/eCWwLSX6/t4hITPVKQyMHoQDRIY5+9K4RFnCBVupK38bo hm4W01BiGnJt9Fca7fY2vRvwFgOwC5zB5DGXrcyBV2MOA0MUaPqcaK+rOJSOwt/2RuTx O+coPMqgehd3dFiojKr38z0OIJbyuyc9vJDF5GggvaLvGdggGkCrrR7VVbvY7SMNK7wv Fcdw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=pONLFwGx; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l20si4930422eda.102.2021.06.22.11.24.37; Tue, 22 Jun 2021 11:25:00 -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=@google.com header.s=20161025 header.b=pONLFwGx; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230338AbhFVSZm (ORCPT + 99 others); Tue, 22 Jun 2021 14:25:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230146AbhFVSZl (ORCPT ); Tue, 22 Jun 2021 14:25:41 -0400 Received: from mail-lf1-x133.google.com (mail-lf1-x133.google.com [IPv6:2a00:1450:4864:20::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4718EC061756 for ; Tue, 22 Jun 2021 11:23:25 -0700 (PDT) Received: by mail-lf1-x133.google.com with SMTP id k10so4391358lfv.13 for ; Tue, 22 Jun 2021 11:23:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FV61UP5NcLLWWDvVqg5arfYv7gGM3LSFINIkuHzruNQ=; b=pONLFwGx3+EykTnB4ze62pOkv+Jpo7Ut9deKl05K8YRybGrbGTHE9TcZrjOqYHA28Y F7juG7LTnIcPuAGg8REQ+Iji7/5RqEAg7qrLnLuSBbfT2GkPwsfo//Ial3EVdkYFzmxk CKybBao4DyUQrD4zyl1LJix8iEHCiuTdudedyCJj8fJLBqDZlxJLQWMgOWG6HOoOvKL/ ghDU6yPvt3hY0VAenfRzHeMii2YCtRH9J7Q1REnR9dErOy4R3iGLRKF98tdiMwVov9Ox gMKEdHNZ/5q9PjN9ckMqJABLMlGWz/DY5Kz8rSmRZ/EUazFMXEsN2dlAUziGJewcQaWU dnJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FV61UP5NcLLWWDvVqg5arfYv7gGM3LSFINIkuHzruNQ=; b=gxFxc7GgZ12kt8RqalxKaxNLVgstI5XNCA7FoOu4OFX8Apf1JPxmrMeRXpNN8YgeFe 7INVYZY1Sfmb1LgXwg5ugh5Ceo0O48jezYieurr/JK5dmnqIGicG+Ymr0yrIAnzZAOg4 YwlBGHhbspDRkZ7eGk9wYvV0xWgvjh7sp3xwqSWn607PXJ02Zn7v4BohHKQ3OcgWNLcl 0tj6oAP3QZPRam2re2zof+0UXpf0eV8HgkTDOh09l8lFKojFExeMKMBb1Cj31M5dmwns f0p7/oER11qoWEudAi3EtLpEHiXnlKZTLBvbsYJ/uT0QaZWFFqk7xu4J9mQ/9V3cHDjU PEDw== X-Gm-Message-State: AOAM531x6ryRkmY7QFF7DVmk3kqJSGtjs8cYBkhjZczmMABAAJEgNA7q vvBMCRcKIg3tfqHq1fthCly3nQ0xLrqWzYqpYJ4w4w== X-Received: by 2002:a19:ac06:: with SMTP id g6mr3959111lfc.299.1624386203402; Tue, 22 Jun 2021 11:23:23 -0700 (PDT) MIME-Version: 1.0 References: <20210621083108.17589-1-sj38.park@gmail.com> <20210621083108.17589-9-sj38.park@gmail.com> In-Reply-To: <20210621083108.17589-9-sj38.park@gmail.com> From: Shakeel Butt Date: Tue, 22 Jun 2021 11:23:12 -0700 Message-ID: Subject: Re: [PATCH v31 08/13] mm/damon/dbgfs: Export kdamond pid to the user space To: SeongJae Park Cc: Andrew Morton , 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 Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.