On 2025-09-09, Petr Mladek <pmla...@suse.com> wrote: >> > Honestly, I think that the flush is not much important because >> > it will most offten have nothing to do. >> > >> > I am just not sure whether it is better to have it there >> > or avoid it. It might be better to remove it after all. >> > And just document the decision. >> >> IMHO keeping the flush is fine. There are cases where there might be >> something to print. And since a printing kthread will get no chance to >> print as long as kdb is alive, we should have kdb flushing that >> console. >> >> Note that this is the only console that will actually see the new >> messages immediately as all the other CPUs and quiesced. > > I do not understand this argument. IMHO, this new > try_acquire()/release() API should primary flush only > the console which was (b)locked by this API. > > It will be called in kdb_msg_write() which tries to write > to all registered consoles. So the other nbcon consoles will > get flushed when the try_acquire() succeeds on them. And the > legacy conosles were never flushed.
Right. I oversaw that it acquires each of the nbcon's. > I would prefer to keep __nbcon_atomic_flush_pending_con(). > I mean to flush only the console which was blocked. Agreed. >> After release try to flush all consoles since there may be a backlog of >> messages in the ringbuffer. The kthread console printers do not get a >> chance to run while kdb is active. > > I like this text. OK, but then change it to talk only about the one console. After release try to flush the console since there may be a backlog of messages in the ringbuffer. The kthread console printers do not get a chance to run while kdb is active. John _______________________________________________ Kgdb-bugreport mailing list Kgdb-bugreport@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport