[phosphor-logging] About the "Stop emitting Entry propChanged before ifacesAdded" change reason

Patrick Williams patrick at stwcx.xyz
Fri Nov 5 08:50:47 AEDT 2021


On Thu, Nov 04, 2021 at 03:36:51PM -0600, Bills, Jason M wrote:

> I'm not sure if it's what we're talking about here with the behavioral 
> change, but in sdbusplus when a new interface is initialized, by default 
> it will also send a PropertiesChanged signal for newly added properties.
> 
> There is a 'skipPropertyChangedSignal' parameter that can be set to 
> 'true' to skip the ProperitesChanged and only send InterfacesAdded:
> bool initialize(const bool skipPropertyChangedSignal = false)
> 
> https://github.com/openbmc/sdbusplus/blob/master/include/sdbusplus/asio/object_server.hpp#L740
> 
> I think there are some components that depend on the default behavior 
> and only watch for PropertiesChanged rather than InterfacesAdded.

This behavior is only in the ASIO object_server implementation, which means it
only covers a subset of daemons.  I really don't know why this was ever added.
There is nothing in the dbus spec to suggest that you should emit a flood of
PropertyChanged signals when starting up.  Maybe this is part of the cause of
some of the boot up performance issues.

We should probably change the defaults to `true` on this and see what breaks.
The commit[1] where this 'skipPropertyChangedSignal' argument was added gave
this as the rationale:

    InterfacesAdded signal itself will send out all propety
    details and it's values during start-up of a D-Bus daemon service.
    Sending properties changed signal confuses the signal handler
    as it can't differentiate between service restart or real
    property change event.

The original code that added the `initialize` method and the
send-signals-for-all-properties behavior was the very first commit[2] James made
so it doesn't give us a whole lot of history or rationale.

1. https://github.com/openbmc/sdbusplus/commit/1ecde800380fbe9c9ce7c8a908aa55aeddb92c1d
2. https://github.com/openbmc/sdbusplus/commit/fce038ad5ac9f458b03d55b441253a9c05dadc3e

-- 
Patrick Williams
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20211104/d51d2748/attachment-0001.sig>


More information about the openbmc mailing list