From: Catalin Marinas <catalin.marinas@arm.com>
To: James Clark <james.clark@arm.com>
Cc: coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org,
suzuki.poulose@arm.com, mathieu.poirier@linaro.org,
mike.leach@linaro.org, leo.yan@linaro.org, broonie@kernel.org,
linux-kernel@vger.kernel.org, Will Deacon <will@kernel.org>,
Mark Rutland <mark.rutland@arm.com>
Subject: Re: [PATCH 0/1] arm64: defconfig: Add Coresight as module
Date: Wed, 21 Sep 2022 16:08:19 +0100 [thread overview]
Message-ID: <Yyso42iP40niLTxO@arm.com> (raw)
In-Reply-To: <20220921140535.152627-1-james.clark@arm.com>
On Wed, Sep 21, 2022 at 03:05:34PM +0100, James Clark wrote:
> As suggested by Catalin here's the change to add Coresight to defconfig.
>
> Unfortunately I don't think we should add CONFIG_CORESIGHT_SOURCE_ETM4X
> which builds a few files until [1] is merged because of the overhead
> of CONFIG_PID_IN_CONTEXTIDR.
>
> [1]: https://lore.kernel.org/lkml/20211021134530.206216-1-leo.yan@linaro.org/T/
I thought the overhead wasn't the problem, it's mostly negligible. We
can probably save a few more cycles on the __switch_to() path by
replacing several isb()s in those functions with a single one just
before cpu_switch_to().
IIRC the issue is that unless a process runs in the root pid namespace,
the actual pid written to contextidr is meaningless.
Now that you reminded me of that thread, I see three options (sorry, not
entirely related to the defconfig updates):
1. Remove CONFIG_PID_IN_CONTEXTIDR and corresponding code completely,
find other events to correlate the task with the trace.
2. Always on CONFIG_PID_IN_CONTEXTIDR (we might as well remove the
Kconfig entry). This would write the root pid namespace value
(task_pid_nr()).
3. Similar to (2) but instead write task_pid_nr_ns(). An alternative
here is to write -1 if the task is not in the root pid namespace.
Strong preference for (1).
--
Catalin
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-09-21 15:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-21 14:05 [PATCH 0/1] arm64: defconfig: Add Coresight as module James Clark
2022-09-21 14:05 ` [PATCH 1/1] " James Clark
2022-09-21 15:26 ` Mark Brown
2022-09-21 16:46 ` Mathieu Poirier
2022-09-22 9:04 ` James Clark
2022-09-22 9:26 ` Suzuki K Poulose
2022-09-21 15:08 ` Catalin Marinas [this message]
2022-09-22 9:34 ` [PATCH 0/1] " James Clark
2022-09-22 10:52 ` Catalin Marinas
2022-09-22 13:06 ` James Clark
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=Yyso42iP40niLTxO@arm.com \
--to=catalin.marinas@arm.com \
--cc=broonie@kernel.org \
--cc=coresight@lists.linaro.org \
--cc=james.clark@arm.com \
--cc=leo.yan@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mathieu.poirier@linaro.org \
--cc=mike.leach@linaro.org \
--cc=suzuki.poulose@arm.com \
--cc=will@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).