[Skiboot] [PATCH 5/6] console: rework flushing to the console driver

Stewart Smith stewart at linux.vnet.ibm.com
Wed Jul 5 11:26:06 AEST 2017


Oliver O'Halloran <oohall at gmail.com> writes:
> There has been a long standing bug in skiboot when a second thread
> writes into the log buffer while another thread is currently flushing.
> In this situation the second thread sets a flag to notify the flushing
> thread that there new data has been written into the log buffer.
> Unforunately the flushing thread loses the log level information when
> this happens and as a result messages that should be filtered are
> written to the console. This patch reworks the flushing process so that
> the flushing thread will parse the start of each log line to determine
> the log level of that line and only flush when it should.
>
> Signed-off-by: Oliver O'Halloran <oohall at gmail.com>
> ---
>  core/console-log.c |  71 +++++++++++++++++++++++++++++++++++
>  core/console.c     | 106 +++++++++++++++++++++++++++++++++++++++++------------
>  2 files changed, 153 insertions(+), 24 deletions(-)

Yeah, this is one of the long standing things that has needed fixing.

I was looking into the code coverage ('make coverage-report')of the
tests on parse_loghdr though, and there's a bunch of branches there that
aren't taken and probably should be tested that we're doing the righ
thing in a few of those scenarios. Able to look and extend the test?

-- 
Stewart Smith
OPAL Architect, IBM.



More information about the Skiboot mailing list