public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andre Tomt <andre@tomt.net>
To: jason.vas.dias@gmail.com
Cc: Ben Gamari <bgamari@gmail.com>, linux-kernel@vger.kernel.org
Subject: Re: per-chroot clock module ?
Date: Sun, 28 Nov 2010 00:51:25 +0100	[thread overview]
Message-ID: <4CF1997D.3020501@tomt.net> (raw)
In-Reply-To: <201011271922.45611.jason.vas.dias@gmail.com>

On 11/27/2010 08:22 PM, Jason Vas Dias wrote:
> RE: why ?
> This would allow one to very easily support websites for totally different timezones , where offsets need not be
> restricted to legal timezone offsets but could encompass years - also nice if you want to run applications whose
> license key has expired .  Also very easy to support multiple instances of cron(1) running in different timezones.
> In any case, the module would ensure that the time the kernel sees internally for all processes is the actual real-time
> clock value; only processes which have their root directory in one of the special chroot directories would get
> a different gettimeofday() or clock_gettime() value .
>
>>
>> It seems like what you want here is simple virtualization. Have you
>> considered KVM? The closest thing to your request currently upstream is
>> containers, although I'm unsure of whether a container can be created
>> with an independent clock. Might be something to look into.
>>
>
> To me, using virtualization to solve this problem is like using a sledgehammer to crack a nut,
> particularly if the optimal performance of the processes running in such chroot environments
> is of paramount importance.

You might want to take a look at Linux-Vserver; it has containers (that 
is, chroot on stereoids) with support for "virtualized time"/clock offset.

Virtualized time is not without downsides, it adds overhead. It will be 
tiny compared to using a sledgehammer of course. The vserver guys puts 
it this way;
"This enables per guest time offsets to allow for adjusting the system 
clock individually per guest. this adds some overhead to the time 
functions and therefore should not be enabled without good reason."

http://linux-vserver.org/

It could be useful to implement such a thing in a "time" namespace, 
making it available to lxc containers and cgroups also.

  reply	other threads:[~2010-11-27 23:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-27 18:21 per-chroot clock module ? Jason Vas Dias
2010-11-27 18:57 ` Ben Gamari
2010-11-27 19:22   ` Jason Vas Dias
2010-11-27 23:51     ` Andre Tomt [this message]
2010-11-27 19:27   ` Elias Gabriel Amaral da Silva
2010-12-03 19:36 ` Pavel Machek
2010-12-30 20:31   ` webmaster
2011-01-02  5:32     ` Pavel Machek
     [not found] <fTxH4-2pP-5@gated-at.bofh.it>
     [not found] ` <fTya5-30n-9@gated-at.bofh.it>
     [not found]   ` <fTyD7-3UB-11@gated-at.bofh.it>
2010-11-28 11:15     ` Bodo Eggert
2010-11-29 12:52       ` Jason Vas Dias

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=4CF1997D.3020501@tomt.net \
    --to=andre@tomt.net \
    --cc=bgamari@gmail.com \
    --cc=jason.vas.dias@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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