From: SeongJae Park <sj@kernel.org>
To: akpm@linux-foundation.org
Cc: changbin.du@gmail.com, mm-commits@vger.kernel.org, sjpark@amazon.de
Subject: Re: + mm-damon-neednt-hold-kdamond_lock-to-print-pid-of-kdamond.patch added to -mm tree
Date: Tue, 28 Sep 2021 07:31:24 +0000 [thread overview]
Message-ID: <20210928073124.14874-1-sj@kernel.org> (raw)
In-Reply-To: <20210928000911.YcLcDNX2u%akpm@linux-foundation.org>
On Mon, 27 Sep 2021 17:09:11 -0700 akpm@linux-foundation.org wrote:
>
> The patch titled
> Subject: mm/damon: needn't hold kdamond_lock to print pid of kdamond
> has been added to the -mm tree. Its filename is
> mm-damon-neednt-hold-kdamond_lock-to-print-pid-of-kdamond.patch
>
> This patch should soon appear at
> https://ozlabs.org/~akpm/mmots/broken-out/mm-damon-neednt-hold-kdamond_lock-to-print-pid-of-kdamond.patch
> and later at
> https://ozlabs.org/~akpm/mmotm/broken-out/mm-damon-neednt-hold-kdamond_lock-to-print-pid-of-kdamond.patch
>
> Before you just go and hit "reply", please:
> a) Consider who else should be cc'ed
> b) Prefer to cc a suitable mailing list as well
> c) Ideally: find the original patch on the mailing list and do a
> reply-to-all to that, adding suitable additional cc's
>
> *** Remember to use Documentation/process/submit-checklist.rst when testing your code ***
>
> The -mm tree is included into linux-next and is updated
> there every 3-4 working days
>
> ------------------------------------------------------
> From: Changbin Du <changbin.du@gmail.com>
> Subject: mm/damon: needn't hold kdamond_lock to print pid of kdamond
>
> Just get the pid by 'current->pid'.
Looks good to me :)
> Meanwhile, to be symmetrical make the 'starts' and 'finishes' logs both info
> level.
We want to log those consistently using 'pr_debug()'[1]. I guess Andrew has
already updated the patch to use 'pr_debug()', but didn't update this commit
message.
Andrew, could you please update above commit message?
[1] https://lore.kernel.org/mm-commits/20210919232257.ZFV1L%25akpm@linux-foundation.org/
>
> Link: https://lkml.kernel.org/r/20210927232432.17750-1-changbin.du@gmail.com
> Signed-off-by: Changbin Du <changbin.du@gmail.com>
> Cc: SeongJae Park <sjpark@amazon.de>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: SeongJae Park <sj@kernel.org>
Thanks,
SJ
> ---
>
> mm/damon/core.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> --- a/mm/damon/core.c~mm-damon-neednt-hold-kdamond_lock-to-print-pid-of-kdamond
> +++ a/mm/damon/core.c
> @@ -652,9 +652,7 @@ static int kdamond_fn(void *data)
> unsigned int max_nr_accesses = 0;
> unsigned long sz_limit = 0;
>
> - mutex_lock(&ctx->kdamond_lock);
> - pr_debug("kdamond (%d) starts\n", ctx->kdamond->pid);
> - mutex_unlock(&ctx->kdamond_lock);
> + pr_debug("kdamond (%d) starts\n", current->pid);
>
> if (ctx->primitive.init)
> ctx->primitive.init(ctx);
> @@ -705,7 +703,7 @@ static int kdamond_fn(void *data)
> if (ctx->primitive.cleanup)
> ctx->primitive.cleanup(ctx);
>
> - pr_debug("kdamond (%d) finishes\n", ctx->kdamond->pid);
> + pr_debug("kdamond (%d) finishes\n", current->pid);
> mutex_lock(&ctx->kdamond_lock);
> ctx->kdamond = NULL;
> mutex_unlock(&ctx->kdamond_lock);
> _
>
> Patches currently in -mm which might be from changbin.du@gmail.com are
>
> mm-damon-remove-unnecessary-do_exit-from-kdamond.patch
> mm-damon-neednt-hold-kdamond_lock-to-print-pid-of-kdamond.patch
next prev parent reply other threads:[~2021-09-28 7:31 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-28 0:09 + mm-damon-neednt-hold-kdamond_lock-to-print-pid-of-kdamond.patch added to -mm tree akpm
2021-09-28 7:31 ` SeongJae Park [this message]
2021-09-28 22:49 ` Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210928073124.14874-1-sj@kernel.org \
--to=sj@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=changbin.du@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mm-commits@vger.kernel.org \
--cc=sjpark@amazon.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.