diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2009-06-04 01:44:04 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2009-06-04 01:44:04 +0200 |
commit | 1e03b754aef576a5cb75f01b1805cdc1f9cc292f (patch) | |
tree | 04fed54897345b57cfef598c3fe5eb00b93e53f8 /udev/udev-event.c | |
parent | b61f48a0e8a4ad264bc0e904ea8bf3b054d5f562 (diff) |
udevd: convert to event worker processes
Event processes now get re-used after they handled an event. This reduces
pressure on the CPU significantly because cloned event processes no longer
cause page faults in the main daemon. After the events have settled, the
no longer needed worker processes get killed.
Diffstat (limited to 'udev/udev-event.c')
-rw-r--r-- | udev/udev-event.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/udev/udev-event.c b/udev/udev-event.c index d52125193c..3f69c0bb7a 100644 --- a/udev/udev-event.c +++ b/udev/udev-event.c @@ -734,18 +734,13 @@ int udev_event_execute_run(struct udev_event *event) monitor = udev_monitor_new_from_socket(event->udev, &cmd[strlen("socket:")]); if (monitor == NULL) continue; - udev_monitor_send_device(monitor, event->dev); + udev_monitor_send_device(monitor, NULL, event->dev); udev_monitor_unref(monitor); } else { char program[UTIL_PATH_SIZE]; char **envp; udev_event_apply_format(event, cmd, program, sizeof(program)); - if (event->trace) - fprintf(stderr, "run %s (%llu) '%s'\n", - udev_device_get_syspath(event->dev), - udev_device_get_seqnum(event->dev), - program); envp = udev_device_get_properties_envp(event->dev); if (util_run_program(event->udev, program, envp, NULL, 0, NULL) != 0) { if (!udev_list_entry_get_flag(list_entry)) |