Re: [PATCH 1/2] gpu: nova-core: gsp: retain the GSP-RM log buffers after unbind

Vladislav Zaharov <[email protected]>
Newsgroups dev.linux.lists.nova-gpu,org.freedesktop.lists.dri-devel,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
On Thu Aug 13, 2026, Danilo Krummrich wrote:
> I think those should use VVec.
> Let's move all the LogBuffer code into gsp/logbuffer.rs to keep gsp.rs clean.
> I think we can avoid this additional unsafe if we just create the retained dir
> right away in module_init().
> dev_dbg!() should be good enough.

All four make sense, thanks - v2 will have them. Creating the retained
directory in module_init() also removes the only reason retain() had to look
at DEBUGFS_ROOT, so the unsafe block goes away with it.

On Thu Aug 13, 2026, John Hubbard wrote:
> I'd *much* rather use a kernel parameter: keep_gsp_logs, instead of
> requiring a rebuild of the kernel.

Agreed, and it makes the patch smaller: with a module parameter the cfg gating
disappears and the code is simply always built. I used a Kconfig because of the
"the only Kconfig needed is for retaining the GSP log buffers after driver
unbind" remark in the earlier thread, which I took literally instead of asking.

That one needs a decision, though. The Rust module parameter abstraction has no
bool: rust/kernel/module_param.rs only instantiates param ops for i8..u64,
isize and usize, and rust/macros/module.rs panics on anything else. Nor is it
quite a one-liner to add, since bare bool parameters rely on
KERNEL_PARAM_OPS_FL_NOARG, which make_param_ops! cannot currently express.

I am happy to write that prerequisite patch, but it would pull this series into
rust/kernel review. So unless bool support is already in flight somewhere I
have not found, I propose v2 uses u8 for now and moves to bool once it exists.
Say the word if you would rather have it done properly first.

The re-test on top of the current tip is still owed; I will run it before v2
and report the result in its cover letter.

Thanks,
Vladislav
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.