Package: nbd-server Version: 2.9.9-6 Severity: normal -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
powertop shows nbd-server with 100 wakeups per second. A look at the source shows the main select loop as the culprit, which includes a 500us timeout for apparently no reason at all. - --- nbd-server.c.orig 2008-03-17 01:28:27.000000000 +0100 +++ nbd-server.c 2008-03-17 01:24:44.000000000 +0100 @@ -1425,7 +1425,14 @@ memcpy(&rset, &mset, sizeof(fd_set)); tv.tv_sec=0; tv.tv_usec=500; - - if(select(max+1, &rset, NULL, NULL, &tv)>0) { +/* if(select(max+1, &rset, NULL, NULL, &tv)>0) { */ +/* + * The code below never checks the timeout, only FD_ISSET is used + * on the select result with no special action if none is set. + * The timeout of 500us caused a lot of unnecessary interrupts, + * for no reason at all. + */ + if(select(max+1, &rset, NULL, NULL, NULL)>0) { DEBUG("accept, "); for(i=0;i<servers->len;i++) { serve=&(g_array_index(servers, SERVER, i)); - -- System Information: Debian Release: lenny/sid APT prefers testing APT policy: (990, 'testing'), (500, 'unstable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.23.9 (PREEMPT) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages nbd-server depends on: ii debconf [debconf-2.0] 1.5.18 Debian configuration management sy ii libc6 2.7-5 GNU C Library: Shared libraries ii libglib2.0-0 2.14.3-1 The GLib library of C routines nbd-server recommends no packages. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD4DBQFH3bxK5q/seprH4LwRAiUhAJwNsvXX/vuKY8Qf6jZCCCb6ZhNW5QCXfyEZ hflTyzk+3sNnmaPEbkZcPw== =JoOe -----END PGP SIGNATURE----- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]