Re: [uml-devel] [PATCH v6] um: Add a high resolution timer subsystem

2015-05-26 Thread stian
> nsecs = timer.it_value.tv_sec * > UM_NSEC_PER_SEC + > timer.it_value.tv_usec * > UM_NSEC_PER_USEC; > nsecs += os_nsecs(); Not looking at the rest of the code, the first thing that comes to my mind i

Re: [uml-devel] [PATCH v6] um: Add a high resolution timer subsystem

2015-05-11 Thread Richard Weinberger
Am 10.05.2015 um 16:34 schrieb Thomas Meyer: > >> Am 10.05.2015 um 14:35 schrieb Richard Weinberger >> : >> >>> On Sun, May 10, 2015 at 1:14 AM, Thomas Meyer wrote: >>> Hi, >>> >>> Changes: >>> - also create posix timer in stub_clone_handler() >>> - incorporated antons remarks >> >> Hm, this pat

Re: [uml-devel] [PATCH v6] um: Add a high resolution timer subsystem

2015-05-11 Thread Thomas Meyer
Am 11.05.2015 9:42 nachm. schrieb Anton Ivanov : > > On 11/05/15 18:41, Thomas Meyer wrote: > > Am 11.05.2015 7:31 nachm. schrieb Anton Ivanov > > : > >> On 11/05/15 18:20, Anton Ivanov wrote: > >>> On 11/05/15 18:00, Thomas Meyer wrote: > Hi, > > maybe there is a bug in how t

Re: [uml-devel] [PATCH v6] um: Add a high resolution timer subsystem

2015-05-11 Thread Anton Ivanov
On 11/05/15 18:41, Thomas Meyer wrote: > Am 11.05.2015 7:31 nachm. schrieb Anton Ivanov > : >> On 11/05/15 18:20, Anton Ivanov wrote: >>> On 11/05/15 18:00, Thomas Meyer wrote: Hi, maybe there is a bug in how the timers are created for all user space processes. In the lat

Re: [uml-devel] [PATCH v6] um: Add a high resolution timer subsystem

2015-05-11 Thread Thomas Meyer
Hi, maybe there is a bug in how the timers are created for all user space processes. In the latest patch I use os__timer_remain for the initial interval. The idea was to launch all timers at the same time. But I now think this can never work using relative times, especially when os__timer_remain

Re: [uml-devel] [PATCH v6] um: Add a high resolution timer subsystem

2015-05-11 Thread Thomas Meyer
Am 11.05.2015 7:31 nachm. schrieb Anton Ivanov : > > On 11/05/15 18:20, Anton Ivanov wrote: > > On 11/05/15 18:00, Thomas Meyer wrote: > >> Hi, > >> > >> maybe there is a bug in how the timers are created for all user space > >> processes. > >> In the latest patch I use os__timer_remain for t

Re: [uml-devel] [PATCH v6] um: Add a high resolution timer subsystem

2015-05-11 Thread Anton Ivanov
On 11/05/15 18:20, Anton Ivanov wrote: > On 11/05/15 18:00, Thomas Meyer wrote: >> Hi, >> >> maybe there is a bug in how the timers are created for all user space >> processes. >> In the latest patch I use os__timer_remain for the initial interval. >> The idea was to launch all timers at the same

Re: [uml-devel] [PATCH v6] um: Add a high resolution timer subsystem

2015-05-11 Thread Anton Ivanov
On 11/05/15 18:00, Thomas Meyer wrote: > Hi, > > maybe there is a bug in how the timers are created for all user space > processes. > In the latest patch I use os__timer_remain for the initial interval. > The idea was to launch all timers at the same time. But I now think this can > never work us

Re: [uml-devel] [PATCH v6] um: Add a high resolution timer subsystem

2015-05-11 Thread Anton Ivanov
The likely suspect is arch/um/os-Linux/skas/process.c It is spinning in the while(1) loop. However, the current code looks correct and the original code does not make any sense at least to me: Original code gets the _VALUE_ of the current userspace itimer() and it ensures that the signal is de

Re: [uml-devel] [PATCH v6] um: Add a high resolution timer subsystem

2015-05-11 Thread Anton Ivanov
Hi Thomas, hi Richard, It is now possible to reproducibly hang it. I have not been able to concoct a synthetic test (yet), but a non-synthetic one, namely installing an update to base-files on Debian is a guaranteed hang. So IO on itself does not hang it, CPU on itself does not, a mix of two do

Re: [uml-devel] [PATCH v6] um: Add a high resolution timer subsystem

2015-05-11 Thread Anton Ivanov
Hurray, Houston we have ignition. We now have working userspace timers. It is still schizophrenic - userspace is HZ, kernel is NOHZ because the userpace has to keep checking "did the kernel timer fire yet" at a HZ interval. However, even that is a major progress compared to having userspace timer

Re: [uml-devel] [PATCH v6] um: Add a high resolution timer subsystem

2015-05-10 Thread Richard Weinberger
Am 10.05.2015 um 16:34 schrieb Thomas Meyer: > >> Am 10.05.2015 um 14:35 schrieb Richard Weinberger >> : >> >>> On Sun, May 10, 2015 at 1:14 AM, Thomas Meyer wrote: >>> Hi, >>> >>> Changes: >>> - also create posix timer in stub_clone_handler() >>> - incorporated antons remarks >> >> Hm, this pat

Re: [uml-devel] [PATCH v6] um: Add a high resolution timer subsystem

2015-05-10 Thread Anton Ivanov
On 10/05/15 15:34, Thomas Meyer wrote: >> Am 10.05.2015 um 14:35 schrieb Richard Weinberger >> : >> >>> On Sun, May 10, 2015 at 1:14 AM, Thomas Meyer wrote: >>> Hi, >>> >>> Changes: >>> - also create posix timer in stub_clone_handler() >>> - incorporated antons remarks >> Hm, this patch does a *l

Re: [uml-devel] [PATCH v6] um: Add a high resolution timer subsystem

2015-05-10 Thread Thomas Meyer
> Am 10.05.2015 um 14:35 schrieb Richard Weinberger > : > >> On Sun, May 10, 2015 at 1:14 AM, Thomas Meyer wrote: >> Hi, >> >> Changes: >> - also create posix timer in stub_clone_handler() >> - incorporated antons remarks > > Hm, this patch does a *lot* more than the changelog says. Hi, yes

Re: [uml-devel] [PATCH v6] um: Add a high resolution timer subsystem

2015-05-10 Thread Anton Ivanov
On 10/05/15 13:35, Richard Weinberger wrote: > On Sun, May 10, 2015 at 1:14 AM, Thomas Meyer wrote: >> Hi, >> >> Changes: >> - also create posix timer in stub_clone_handler() >> - incorporated antons remarks > Hm, this patch does a *lot* more than the changelog says. Richard, I think this is what

Re: [uml-devel] [PATCH v6] um: Add a high resolution timer subsystem

2015-05-10 Thread Richard Weinberger
On Sun, May 10, 2015 at 1:14 AM, Thomas Meyer wrote: > Hi, > > Changes: > - also create posix timer in stub_clone_handler() > - incorporated antons remarks Hm, this patch does a *lot* more than the changelog says. > > diff --git a/arch/um/Makefile b/arch/um/Makefile > index 17d4460..a4a434f 1006