[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CD2CABCB2C0A0D4682C5F8AD8401415409846D@HKXPRD3002MB006.064d.mgd.msft.net>
Date: Fri, 26 Sep 2014 12:30:14 +0000
From: Thomas Shao <huishao@...rosoft.com>
To: Mike Surcouf <mps.surcouf.lkml@...il.com>
CC: "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"driverdev-devel@...uxdriverproject.org"
<driverdev-devel@...uxdriverproject.org>,
Olaf Hering <olaf@...fle.de>, "Robo Bot" <apw@...onical.com>,
"jasowang@...hat.com" <jasowang@...hat.com>,
"KY Srinivasan" <kys@...rosoft.com>,
Haiyang Zhang <haiyangz@...rosoft.com>
Subject: RE: [PATCH] Drivers: hv: util: Implement Time Synchronization using
host time sample
> -----Original Message-----
> From: Mike Surcouf [mailto:mps.surcouf.lkml@...il.com]
> Sent: Friday, September 26, 2014 7:53 PM
> To: Thomas Shao
> Cc: gregkh@...uxfoundation.org; linux-kernel@...r.kernel.org;
> driverdev-devel@...uxdriverproject.org; Olaf Hering; Robo Bot;
> jasowang@...hat.com; KY Srinivasan; Haiyang Zhang
> Subject: Re: [PATCH] Drivers: hv: util: Implement Time Synchronization using
> host time sample
>
> > +/* helper function to call adjtimex command in user mode */ static
> > +void run_adjtimex_cmd(s64 tickvalue) {
> > + char *argv[4], *envp[3];
> > + char str_tickvalue[20];
> > +
> > + sprintf(str_tickvalue, "%lld", tickvalue);
> > +
> > + argv[0] = "/sbin/adjtimex";
> > + argv[1] = "-t";
> > + argv[2] = str_tickvalue;
> > + argv[3] = NULL;
> > +
> > + envp[0] = "HOME=/";
> > + envp[1] = "PATH=/sbin:/bin:/usr/sbin:/usr/bin";
> > + envp[2] = NULL;
> > +
> > + call_usermodehelper(argv[0], argv, envp, UMH_WAIT_EXEC); }
>
>
> What happens when adjtimex is not present?
> Is there no kernel space function for that?
> Does this patch affect "not setting correct time on restore" or "not setting
> correct time on live migration" bug?
>
If adjtimex is not present, then the slew time part didn't take effect.
There is a kernel space do_adjtmex, but it's only for sys call and not exposed to module. So I didn't use it in my patch.
With this patch, it will step the clock if the time drift is larger than 1 seconds, so it can solve
the issue your mentioned. And on the other hand, "setting correct time on restore" is already fixed
in other patch, which is already in upstream.
> Thanks
>
> Mike
Powered by blists - more mailing lists