All of lore.kernel.org
 help / color / mirror / Atom feed
* RFC: new design of phosphor-time-manager on sdbusplus
@ 2017-01-13  7:42 Mine
  2017-01-13  9:11 ` Deepak Kodihalli
  2017-01-16 19:44 ` Patrick Williams
  0 siblings, 2 replies; 19+ messages in thread
From: Mine @ 2017-01-13  7:42 UTC (permalink / raw)
  To: OpenBMC Maillist

[-- Attachment #1: Type: text/plain, Size: 1723 bytes --]

I’d like to discuss the design of phosphor-time-manager with the new
sdbusplus interfaces.

Please see below background and new design, let me know if you have any
comments.
Thanks!
Background

Legacy time-manager expose below interfaces and methods:

   - curr_time_mode
   - curr_time_owner
   - requested_time_mode
   - requested_time_owner
   - GetTime(target)
   - SetTime(target, time)

The implementation of Get/SetTime() will check the current time mode and
owner, and do below:

   - For GetTime(<target>):
      - If target is “bmc”, return BMC time;
      - If target is “host”, return Host time;
      - Else, return error
   - For SetTime(target, time):
      - If target is “bmc”:
         - If mode is NTP, return error
         - If owner is “HOST”, return error
         - Set BMC time
      - If target is “host”:
         - If owner is “BMC”, return error
         - Set Host time
         - If owner is “SPLIT”, save the diff between BMC time and Host
         time;

New Design

Now with sdbusplus, we have EpochTime interface, with elapsed property.

After discussion with Li Yi and Vishwa, we decided to implement as below:

Create two objects:

   - BmcEpoch
   - HostEpoch

They both implements EpochTime interface.

For BmcEpoch:

   - When elapsed() is called, return BMC time;
   - When elapsed(us) is called, use above SetTime(“bmc”) logic

For HostEpoch:

   - When elapsed() is called, return HOST time;
   - When elapsed(us) is called, use above SetTime(“host”) logic.

And there will be no “curr_time_mode/owner” or “requested_time_mode/owner”
properties on DBUS.

--
BRs,
Lei YU

[-- Attachment #2: Type: text/html, Size: 8747 bytes --]

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2017-01-21  9:56 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-13  7:42 RFC: new design of phosphor-time-manager on sdbusplus Mine
2017-01-13  9:11 ` Deepak Kodihalli
2017-01-13 12:35   ` Mine
2017-01-16 19:44 ` Patrick Williams
2017-01-17  7:51   ` Mine
2017-01-18 11:07     ` vishwa
2017-01-18 13:45       ` Mine
2017-01-18 14:44     ` Patrick Williams
2017-01-19  3:48       ` Mine
2017-01-19  6:11         ` vishwa
2017-01-19  7:37           ` Mine
2017-01-19  8:39             ` vishwa
2017-01-19  9:48               ` Mine
2017-01-20 19:18                 ` Patrick Williams
2017-01-20 19:08             ` Patrick Williams
2017-01-21  9:56               ` Mine
2017-01-19 12:24       ` vishwa
2017-01-20 19:20         ` Patrick Williams
2017-01-19 12:24       ` vishwa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.