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 is

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-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

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

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 using

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 Anton Ivanov
On 11/05/15 18:41, Thomas Meyer wrote: Am 11.05.2015 7:31 nachm. schrieb Anton Ivanov anton.iva...@kot-begemot.co.uk: 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

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 anton.iva...@kot-begemot.co.uk: On 11/05/15 18:41, Thomas Meyer wrote: Am 11.05.2015 7:31 nachm. schrieb Anton Ivanov anton.iva...@kot-begemot.co.uk: On 11/05/15 18:20, Anton Ivanov wrote: On 11/05/15 18:00, Thomas Meyer wrote: Hi,

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 richard.weinber...@gmail.com: On Sun, May 10, 2015 at 1:14 AM, Thomas Meyer tho...@m3y3r.de wrote: Hi, Changes: - also create posix timer in stub_clone_handler() - incorporated antons remarks

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 time. But I

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 anton.iva...@kot-begemot.co.uk: 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

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 richard.weinber...@gmail.com: On Sun, May 10, 2015 at 1:14 AM, Thomas Meyer tho...@m3y3r.de wrote: Hi, Changes: - also create posix timer in stub_clone_handler() - incorporated antons remarks

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 tho...@m3y3r.de 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

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 richard.weinber...@gmail.com: On Sun, May 10, 2015 at 1:14 AM, Thomas Meyer tho...@m3y3r.de wrote: Hi, Changes: - also create posix timer in stub_clone_handler() - incorporated antons remarks Hm,

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 tho...@m3y3r.de 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

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 richard.weinber...@gmail.com: On Sun, May 10, 2015 at 1:14 AM, Thomas Meyer tho...@m3y3r.de wrote: Hi, Changes: - also create posix timer in stub_clone_handler() - incorporated antons remarks Hm, this patch does a *lot* more than

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

2015-05-09 Thread Thomas Meyer
Hi, Changes: - also create posix timer in stub_clone_handler() - incorporated antons remarks diff --git a/arch/um/Makefile b/arch/um/Makefile index 17d4460..a4a434f 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile @@ -130,7 +130,7 @@ export LDS_ELF_FORMAT := $(ELF_FORMAT) # The wrappers