Skip to content

Conversation

@rvosk
Copy link

@rvosk rvosk commented Dec 15, 2025

When optee emits log, the NW interrupts are masked, if console_putc() is implemetned by writing to a uart, given uart slow characteristic, this could introduce a big NW irq latency.

Though, this patch brings a side effect: trace_ext_put() may emit log simultenaously thus the log is hard to read. However, comparing the side effect between hard to read log and big NW irq latency, the NW irq latency is much more severe, we have to compromise here.

When optee emits log, the NW interrupts are masked, if console_putc()
is implemetned by writing to a uart, given uart slow characteristic,
this could introduce a big NW irq latency.

Though, this patch brings a side effect: trace_ext_put() may emit log
simultenaously thus the log is hard to read. However, comparing the
side effect between hard to read log and big NW irq latency, the NW irq
latency is much more severe, we have to compromise here.

Signed-off-by: Jisheng Zhang <[email protected]>
@jenswi-linaro
Copy link
Contributor

An even easier fix is to disable logs from OP-TEE.
We added this lock for a reason: to assist debugging hard problems in the secure world.
When irq latency is a concern, perhaps logging isn't needed in the secure world.

@rvosk
Copy link
Author

rvosk commented Dec 15, 2025

An even easier fix is to disable logs from OP-TEE. We added this lock for a reason: to assist debugging hard problems in the secure world. When irq latency is a concern, perhaps logging isn't needed in the secure world.

Disabling log seems a big hammer, we want to keep some important logs such as tee panic log so that we can know what happened when the panic happens.

@jenswi-linaro
Copy link
Contributor

OP-TEE is supposed to be rather quiet when configured with loglevel error.
Anyway, I guess we could make this a config option, because we really want to be able to get readable logs sometimes.

Copy link
Contributor

@etienne-lms etienne-lms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @rvosk. Maybe #6727 can help you.
I've left stale it quite a while ago now. Feel free to do whatever you what with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants