[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] Some doubt about host_alarm_handler function and SIGALRM in qemu-xen-traditional



Hello everyone.
When I use gdb to trace qemu-xen-traditional, I have a little doubt
about host_alarm_handler.  I already understand that it can implement
a dynamic tick, through tickless to save CPU cost. However,  I found
that the following code has never run when I use qemu-xen-traditional
with xen(See attachment master.cfg).
        if (env) {
            /* stop the currently executing cpu because a timer occured */
            cpu_interrupt(env, CPU_INTERRUPT_EXIT);
        }
So I wonder if this code is useful when I use xen?

Moreover, I use this following function host_alarm_handler_empty
instead of host_alarm_handler as SIGALRM signal handler. Then I change
dynticks_timer from one-shot timer to period timer, and set
ev.sigev_notify = SIGEV_NONE when I create dynticks_timer (See
attachment period_timer.patch). I found that no problem except for usb
mouse slowness.
static void host_alarm_handler_empty(int host_signum)
{
        return;
}
Finally, I use the following bash command to send the SIGALRM signal
to qemu-dm at 1ms intervals, the usb mouse also recovers fluency. I
can't understand how SIGALRM works, because SIGALRM just call
host_alarm_handler_empty  function?
# QEMU_PID=`pgrep qemu-dm`; while true; do kill -s SIGALRM $QEMU_PID;
sleep 0.001; done

I would appreciate it if anyone could provide me some ideas.
-------------------------------------------------------------
Thanks,
Lu

Attachment: period_timer.patch
Description: Text Data

Attachment: master.cfg
Description: Binary data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.