From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
John Stultz <john.stultz@linaro.org>,
Stephen Boyd <sboyd@kernel.org>,
Florian Weimer <fweimer@redhat.com>,
Theodore Ts'o <tytso@mit.edu>, "H. Peter Anvin" <hpa@zytor.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Alistair Francis <alistair.francis@wdc.com>,
GNU C Library <libc-alpha@sourceware.org>,
Karel Zak <kzak@redhat.com>,
Lennart Poettering <lennart@poettering.net>,
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Subject: Re: New kernel interface for sys_tz and timewarp?
Date: Tue, 13 Aug 2019 23:56:15 +0200 [thread overview]
Message-ID: <20190813215615.GE3600@piout.net> (raw)
In-Reply-To: <CAHk-=wiO2CWONDBud4nxoPgUJN1JEewFWhHa5wAqY8G5rrTXRQ@mail.gmail.com>
On 13/08/2019 10:30:34-0700, Linus Torvalds wrote:
> On Tue, Aug 13, 2019 at 2:06 AM Arnd Bergmann <arnd@arndb.de> wrote:
> >
> > * Should we allow setting the sys_tz on new architectures that use only
> > time64 interfaces at all, or should we try to get away from that anyway?
>
> We should not do TZ on a kernel level at all. At least not a global
> one. It makes no sense.
>
> If the original TZ had been defined to have some sane model (perhaps
> per session? Something like that), it would be worth doing. As it is,
> a global TZ is just plain wrong. Per process would be sane (but
> largely useless, I suspect).
>
> > * Should the NTP timewarp setting ("int persistent_clock_is_local" and
> > its offset) be controllable separately from the timezone used in other
> > drivers?
> >
> > * If we want keep having a way to set the sys_tz, what interface
> > should that use?
>
> I suspect we need to have _some_ way to set the kernel TZ for legacy
> reasons, but it should be deprecated and if we can make do without it
> entirely on architectures where the legacy doesn't make sense, then
> all the better.
>
> I suspect the only actual _valid_ use in the kernel for a time zone
> setting is likely for RTC clock setting, but even that isn't really
> "global", as much as "per RTC".
>
Userspace doesn't need help from the kernel to set the RTC using local
time if necessary, this info is in /etc/adjtime and hwclock uses it
correctly. It is only needed when the kernel sets the rtc time
> That said, if glibc has some sane semantics for TZ, maybe the kernel
> can help with that. But I assume/think that glibc uses (a) environment
> variables and (b) a filesystem-set default (per-user file with a
> system-wide default? I don't know what people do). I suspect the
> kernel can't really do any better.
>
> Linus
--
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2019-08-13 21:56 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-13 9:05 New kernel interface for sys_tz and timewarp? Arnd Bergmann
2019-08-13 17:10 ` John Stultz
2019-08-13 21:45 ` Alexandre Belloni
2019-08-13 17:30 ` Linus Torvalds
2019-08-13 17:49 ` Paul Eggert
2019-08-13 19:31 ` Florian Weimer
2019-08-13 20:04 ` Arnd Bergmann
2019-08-13 21:56 ` Alexandre Belloni [this message]
2019-08-14 0:06 ` Theodore Y. Ts'o
2019-08-14 8:31 ` Arnd Bergmann
2019-08-14 9:09 ` Lennart Poettering
2019-08-14 9:32 ` Alexandre Belloni
2019-08-14 12:15 ` Lennart Poettering
2019-08-19 11:09 ` Karel Zak
2019-08-19 13:43 ` Thomas Gleixner
2019-08-19 13:49 ` Thomas Gleixner
2019-08-20 18:45 ` Alexandre Belloni
2019-08-20 18:47 ` Alexandre Belloni
2019-08-20 18:58 ` Alexandre Belloni
2019-08-27 16:27 ` Arnd Bergmann
2019-08-27 16:31 ` Alexandre Belloni
2019-08-14 16:26 ` David Laight
2019-08-14 16:47 ` hpa
2019-08-15 13:22 ` Arnd Bergmann
2019-08-15 15:05 ` Theodore Y. Ts'o
2019-08-15 15:24 ` hpa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190813215615.GE3600@piout.net \
--to=alexandre.belloni@bootlin.com \
--cc=alistair.francis@wdc.com \
--cc=arnd@arndb.de \
--cc=fweimer@redhat.com \
--cc=hirofumi@mail.parknet.co.jp \
--cc=hpa@zytor.com \
--cc=john.stultz@linaro.org \
--cc=kzak@redhat.com \
--cc=lennart@poettering.net \
--cc=libc-alpha@sourceware.org \
--cc=linux-kernel@vger.kernel.org \
--cc=palmer@dabbelt.com \
--cc=sboyd@kernel.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).