[systemd-devel] [ANNOUNCE] systemd v28 (original) (raw)

Lennart Poettering lennart at poettering.net
Thu May 26 11:34:52 PDT 2011


Heya,

http://www.freedesktop.org/software/systemd/systemd-28.tar.bz2

The biggest change is that we no longer install the hwclock services. Details on this:

Instead of relying on "hwclock --hctosys" to deal with RTCs in local clocks we now do this internally in PID 1. This is much faster, simpler and shorter on one hand (i.e. one magic settimeofday() call, that's all), but also more correct: we actually pass the timezone delta to the kernel instead of reading, shifting and writing the clock. i.e. we use the right API here -- which hwclock doesn't use. It also has the benefit that we can always rely on a valid clock and do not have to sync services against hwclock-load.service, because systemd fixes the clock as one of the very first things it does.

At shutdown we no longer invoke "hwclock --systohc", i.e. do not write the system clock back to the RTC. Why? In general there's not really a reason to assume that the system clock was anymore correct than the RTC so it's probably a good idea to leave the RTC untouched. The only time when the system clock is probably very reliable is when NTP is used, but in that case the kernel syncs the system clock to the RTC clock anyway every 11 minutes, hence doing this in userspace is pointless. And if the user changes the system clock manually it's his duty to sync that through to the RTC, and if he doesn't then he probably has a reason to. (a future clock mechanism bus service shipped along systemd of course will sync the clock in such a case through to RTC). Applying the time to RTC instantly instead of delaying that to shutdown also makes sure the time change is not lost if this system is suddenly turned off.

This should make things a lot simpler for stateless systems, or livecds, since the RTC is never touched by default.

systemd will read the 3rd line of /etc/adjtime to figure our whether the RTC is in UTC or LOCAL, as always, hence this change should be fully compatible. However, embedded setups (and in fact all distros by default) should not ship /etc/adjtime at all, which means UTC RTC.

There's one thing hwclock does that is lost this way: the automatic RTC systematic drift detection and adjustment it does at boot. But that's a very questionnable feature anyway and breaks horribly in multi-boot setups. The new scheme will not do drifting by default anymore, but that doesn't mean people who are into this kind of stuff couldn't still enable it. For example they you could steal the old units from git and then make them optionally installable. (Maybe you can even convince Karel to ship them along u-l.). However, I think this stuff should really be an option, not the default. And honestly, if you want correct time, use NTP and only NTP, don't use hacks like drift detection. After all to make the drift detection work correctly you need NTP as reliable time base to compare against anyway, so why bother?

So yupp, the interaction with the RTC is very simple now:

a) the kernel reads the RTC and sets the system clock to it, assuming UTC b) as first thing systemd applies the timezone shift -- if it finds the RTC configured for LOCAL in /etc/adjtime c) When NTP is used the kernel syncs the system clock down to the RTC every 11 min d) When the user configures the system clock manually this should be synced down to the RTC right away, also manually.

Shortlog:

Harald Hoyer (1): readahead-collect: ignore EACCES for fanotify

Kay Sievers (10): missing: add IP_TRANSPARENT sd-daemon: move sd_hidden from .h to .c file socket: always use SO_{RCV,SND}BUFFORCE to allow larger values bus_property_append_long: use signed long and 'x' in the signature for DBUS_TYPE_INT64 update TODO update TODO rtc in localtime: use settimeofday(NULL, tz) instead of hwclock(8) update TODO drop hwclock-save.service sd-daemon: remove superfluous sd_hidden from static function

Lennart Poettering (4): util: use new VT ESC sequence to clear scrollback buffer socket: expose mq params in introspection data readahead: explain that it is safe to ignore EACCES build-sys: prepare v28

Michal Schmidt (1): dbus-common: fix segfault when a DBus message has no interface

William Swanson (1): man: update the list of unit search locations

Lennart

-- Lennart Poettering - Red Hat, Inc.



More information about the systemd-devel mailing list