Linux Perf Users
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Arnaldo Carvalho de Melo" <acme@kernel.org>
Cc: linux-perf-users@vger.kernel.org
Subject: Re: [PATCH 5/8] perf config: Serialize config file access with a mutex
Date: Tue, 06 Oct 2026 15:07:46 +0000	[thread overview]
Message-ID: <20261006150746.84DCB1F0089B@smtp.kernel.org> (raw)
In-Reply-To: <20261006145729.3028247-6-acme@kernel.org>

> From: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> Config file access shares the static parser state and, since
> perf_config__set_variable() became an entry point for background
> features, can run on more than one thread: a feature writing the
> config while perf top's display thread reads it.  Serialize parsing
> and rewriting with config_mutex and the whole read-modify-write of
> perf_config__set_variable() with config_update_mutex; config_set_mutex
> comes before it, as building the set parses the config files.
> 
> perf has its own mutex type, util/mutex.h; the file scope mutexes
> here use the DEFINE_MUTEX() static initializer added in the previous
> patch.  The two lazy inits that system_path() and home_perfconfig()
> do would leak all but one of the strings racing on two threads, so
> they move to DO_ONCE(), added in the previous patch as well.
> bad_config() runs on the dispatching thread, outside config_mutex, so
> it stops reading config_file_name, which the parsing thread owns.
> 
> Assisted-by: LLM
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261006145729.3028247-1-acme@kernel.org?part=5


  reply	other threads:[~2026-10-06 15:07 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-06 14:57 [PATCH v12 0/8] perf tools: Add progress diagnostics and a false-sharing workload Arnaldo Carvalho de Melo
2026-10-06 14:57 ` [PATCH 1/8] perf config: Move perf_config__set_variable() to util/config.c Arnaldo Carvalho de Melo
2026-10-06 15:10   ` sashiko-bot
2026-10-06 14:57 ` [PATCH 2/8] perf config: Make perf_etc_perfconfig() never return NULL Arnaldo Carvalho de Melo
2026-10-06 15:05   ` sashiko-bot
2026-10-06 14:57 ` [PATCH 3/8] perf mutex: Add DEFINE_MUTEX() static initializer Arnaldo Carvalho de Melo
2026-10-06 15:02   ` sashiko-bot
2026-10-06 14:57 ` [PATCH 4/8] perf mutex: Add DO_ONCE() for one-time initialization Arnaldo Carvalho de Melo
2026-10-06 15:04   ` sashiko-bot
2026-10-06 14:57 ` [PATCH 5/8] perf config: Serialize config file access with a mutex Arnaldo Carvalho de Melo
2026-10-06 15:07   ` sashiko-bot [this message]
2026-10-06 14:57 ` [PATCH 6/8] perf report: Add --progress option Arnaldo Carvalho de Melo
2026-10-06 15:03   ` sashiko-bot
2026-10-06 14:57 ` [PATCH 7/8] perf report: Add --no-progress option Arnaldo Carvalho de Melo
2026-10-06 15:05   ` sashiko-bot
2026-10-06 14:57 ` [PATCH 8/8] perf test: Add false_sharing workload exhibiting cross-CPU false sharing Arnaldo Carvalho de Melo
2026-10-06 15:03   ` sashiko-bot
2026-10-07  0:07 ` [PATCH v12 0/8] perf tools: Add progress diagnostics and a false-sharing workload Namhyung Kim
2026-10-07  9:44   ` Arnaldo Carvalho de Melo

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=20261006150746.84DCB1F0089B@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=acme@kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox