mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Carlos O'Donell <carlos@redhat.com>
To: Thomas Gleixner <tglx@linutronix.de>,
	Zack Weinberg <zackw@panix.com>, Cyril Hrubis <chrubis@suse.cz>
Cc: Dmitry Safonov <dima@arista.com>, Andrei Vagin <avagin@gmail.com>,
	GNU C Library <libc-alpha@sourceware.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [Y2038][time namespaces] Question regarding CLOCK_REALTIME support plans in Linux time namespaces
Date: Fri, 30 Oct 2020 18:19:38 -0400	[thread overview]
Message-ID: <7bb5837f-1ff6-2b2c-089e-e2441d31ddb2@redhat.com> (raw)
In-Reply-To: <87h7qbmqc3.fsf@nanos.tec.linutronix.de>

On 10/30/20 4:06 PM, Thomas Gleixner wrote:
> On Fri, Oct 30 2020 at 12:58, Carlos O'Donell wrote:
>> I expect that more requests for further time isolation will happen
>> given the utility of this in containers.
> 
> There was a lengthy discussion about this and the only "usecase" which
> was brought up was having different NTP servers in name spaces, i.e. the
> leap second ones and the smearing ones.

In the non-"request for ponies" category:

* Running legacy 32-bit applications in containers with CLOCK_REALTIME set
  to some value below y2038.

* Testing kernel and userspace clock handling code without needing to
  run on bare-metal, VM, or other.
 
> Now imagine 1000 containers each running their own NTP. Guess what the
> host does in each timer interrupt? Chasing 1000 containers and update
> their notion of CLOCK_REALTIME. In the remaining 5% CPU time the 1000
> containers can do their computations.

How is this different than balancing any other resource that you give
to a container/vm on a host?

Can you enable 1000 containers running smbd/nmbd and expect to get
great IO performance?
 
> But even if you restrict it to a trivial offset without NTP
> capabilities, what's the semantics of that offset when the host time is
> set?

Now you're talking about an implementation. This thread is simply
"Would we implement CLOCK_REALTIME?" Is the answer "Maybe, if we solve
all these other problems?"

>> If we have to use qemu today then that's where we're at, but again
>> I expect our use case is representative of more than just glibc.
> 
> For testing purposes it might be. For real world use cases not so
> much. People tend to rely on the coordinated nature of CLOCK_TAI and
> CLOCK_REALTIME.

Except we have two real world use cases, at the top of this email, 
that could extend to a lot of software. We know legacy 32-bit 
applications exist that will break with CLOCK_REALTIME past
y2038. Software exists that manipulates time and needs testing
with specific time values e.g. month crossings, day crossings,
leap year crossings, etc.
 
>> Does checkpointing work robustly when userspace APIS use 
>> CLOCK_REALTIME (directly or indirectly) in the container?
> 
> AFAICT, yes. That was the conclusion over the lenghty discussion about
> time name spaces and their requirements.

If this is the case then have we established behaviours that
happen when such processes are migrated to other systems with
different CLOCK_REALTIME clocks? Would these behaviours serve
as the basis of how CLOCK_REALTIME in a namespace would behave?

That is to say that migrating a container to a system with a
different CLOCK_REALTIME should behave similarly to what happens
when CLOCK_REALTIME is changed locally and you have a container
with a unique CLOCK_REALTIME?

> Here is the Linux plumber session related to that:
>      https://www.youtube.com/watch?v=sjRUiqJVzOA

Thanks. I watched the session. Informative :-)

-- 
Cheers,
Carlos.


  reply	other threads:[~2020-10-30 22:19 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-30 10:02 Lukasz Majewski
2020-10-30 13:08 ` Thomas Gleixner
2020-10-30 15:43   ` Lukasz Majewski
2020-10-30 13:58 ` Cyril Hrubis
2020-10-30 14:02   ` Zack Weinberg
2020-10-30 15:10     ` Thomas Gleixner
2020-10-30 16:58       ` Carlos O'Donell
2020-10-30 20:06         ` Thomas Gleixner
2020-10-30 22:19           ` Carlos O'Donell [this message]
2020-10-31  1:38             ` Thomas Gleixner
2020-11-03 12:43               ` Cyril Hrubis
2020-11-05 17:25               ` Carlos O'Donell
2020-11-07  0:47                 ` Thomas Gleixner
2020-11-19 18:37                   ` Carlos O'Donell
2020-11-20  0:14                     ` Thomas Gleixner
2020-11-25 17:06                       ` Petr Špaček
2020-11-25 20:37                       ` Carlos O'Donell
2020-11-26  0:17                         ` Thomas Gleixner
2020-11-26  3:05                           ` Carlos O'Donell
2020-11-26  8:21                             ` Andreas Schwab
2020-11-14 10:25 ` Pavel Machek

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=7bb5837f-1ff6-2b2c-089e-e2441d31ddb2@redhat.com \
    --to=carlos@redhat.com \
    --cc=avagin@gmail.com \
    --cc=chrubis@suse.cz \
    --cc=dima@arista.com \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=zackw@panix.com \
    /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

Powered by JetHome