mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
dmeventd: prevent busy looping on CPU
Use usleep when looping on DM_WAIT_RETRY.
This commit is contained in:
parent
b87c148499
commit
7c5feaed3b
@ -1,5 +1,6 @@
|
|||||||
Version 1.02.84 -
|
Version 1.02.84 -
|
||||||
====================================
|
====================================
|
||||||
|
Avoid busy looping on CPU when dmeventd reads event DM_WAIT_RETRY.
|
||||||
Ensure global mutex is being hold when working with dmeventd thread.
|
Ensure global mutex is being hold when working with dmeventd thread.
|
||||||
Drop taking timeout mutex for un/registering dmeventd monitor.
|
Drop taking timeout mutex for un/registering dmeventd monitor.
|
||||||
Allow section names in config file data to be quoted strings.
|
Allow section names in config file data to be quoted strings.
|
||||||
|
@ -796,8 +796,10 @@ static void *_monitor_thread(void *arg)
|
|||||||
thread->current_events = 0;
|
thread->current_events = 0;
|
||||||
|
|
||||||
wait_error = _event_wait(thread, &task);
|
wait_error = _event_wait(thread, &task);
|
||||||
if (wait_error == DM_WAIT_RETRY)
|
if (wait_error == DM_WAIT_RETRY) {
|
||||||
|
usleep(100); /* avoid busy loop */
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (wait_error == DM_WAIT_FATAL)
|
if (wait_error == DM_WAIT_FATAL)
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user