[Skiboot] [PATCH V3 5/6] Introduces get and put elog routine and reference count field in elog structure
stewart at linux.vnet.ibm.com
Thu Jun 30 19:20:34 AEST 2016
Mukesh Ojha <mukesh02 at linux.vnet.ibm.com> writes:
> Introduces a reference count variable in the errorlog structure, which is
> to track the number of user of errorlog buffer.
> get_elog and put_elog routine to increment/decrement the reference count variable.
> errorlog buffer return to the pool on zero count of reference count.
> The reason of introducing this patch, as in BMC systems, we use the same
> errorlog buffer to send the log to both BMC, and to the host kernel. This
> patch ensures that one does not free the buffer, while the other is
> using it.
Why not use lists? Have a list for error logs that need to be sent to
FSP/BMC/whatever. That way you could queue up a few while the BMC
reboots or something and send them across. Odds are you'll want to use
the pool allocator in include/pool.h for that so that we don't have the
possibility of running out of heap.
OPAL Architect, IBM.
More information about the Skiboot