Date: Tue, 11 Nov 2014 08:09:57 -0800 From: Rui Paulo <rpaulo@me.com> To: David Chisnall <theraven@FreeBSD.org> Cc: freebsd-current@freebsd.org, Allan Jude <allanjude@FreeBSD.org> Subject: Re: Changing timezone without reboot/restarting each service? Message-ID: <101111B9-226C-4E74-9318-376A9DADC6D0@me.com> In-Reply-To: <96024C48-850E-4511-94E5-C39E5A8AA77F@FreeBSD.org> References: <5460B143.3010004@FreeBSD.org> <1415676518.1517572.189478341.09FB6AE5@webmail.messagingengine.com> <5461841F.9080208@freebsd.org> <96024C48-850E-4511-94E5-C39E5A8AA77F@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Nov 11, 2014, at 00:56, David Chisnall <theraven@FreeBSD.org> wrote: >=20 > On 11 Nov 2014, at 03:35, Allan Jude <allanjude@FreeBSD.org> wrote: >=20 >> jkh@ mentioned this specifically when he gave his talk at EuroBSDCon = and >> MeetBSD, about how Apple solved this in LaunchD, because apparently >> originally libc DID check /etc/localtime constantly. >=20 > Darwin also has the notify(3) interface, which allows one-bit messages = to be transmitted either from the kernel to userspace or from userspace = to userspace very cheaply. This is ideal for this sort of 'something = you've cached is change, go and do something expensive to fix it' use = (time zone has changed, network connectivity has changed, power state = has changed). You can assign notifications to either file descriptors = (that can be monitored with kqueue), to signals, or to flags in memory = for things where polling is cheaper (as in this case - the libc = functions could just check whether a specific flag is set in memory when = accessing the time zone info and load a newer one if changed). Except that's not how it works for network events: kernel control = sockets are used to communicate between the kernel and userland about = the state of the network. Kernel control sockets carry kernel event = messages. -- Rui Paulo
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?101111B9-226C-4E74-9318-376A9DADC6D0>