On Fri, Sep 29, 2006 at 06:43:04AM -0700, John Zavgren wrote:
> Now, I understand that its good to make the date command cheat, because
> then, each UML host will know the correct time of day. This is good
> because it eliminates the hassle of setting the clock offset in each
> UML host. In my case, this convenience is a big problem. 
> 
> So, how does one disable this cheating? 

I described how to do this already.  Here's one way to do it:

Make um_timer() remember the last time it was called and set
local_offset as follows:

unsigned long long last_time;

irqreturn_t um_timer(int irq, void *dev, struct pt_regs *regs)
{
        ...
        current = get_time();
        local_offset -= 9 * (current - last_time) / 10;
        last_time = current;
        ...
}

If my thinking is correct, this will make the timer subtract off 90%
of the time since the last tick.

This won't affect what you've already done to jiffies, since timer_irq
calls os_nsecs directly (and thus its elapsed time doesn't take
local_offset into account, as it shouldn't).

                                Jeff

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
User-mode-linux-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user

Reply via email to