summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorMichael Brown2014-06-01 20:24:16 +0200
committerMichael Brown2014-06-01 20:54:23 +0200
commit9f0b7f428af04d0c5ddda78f9b034625f2f91831 (patch)
tree54a8cf4b2a5d88e730411756fb4d283b030220d2 /src/usr
parent[librm] Allow for the PIC interrupt vector offset to be changed (diff)
downloadipxe-9f0b7f428af04d0c5ddda78f9b034625f2f91831.tar.gz
ipxe-9f0b7f428af04d0c5ddda78f9b034625f2f91831.tar.xz
ipxe-9f0b7f428af04d0c5ddda78f9b034625f2f91831.zip
[ifmgmt] Do not sleep CPU while configuring network devices
iPXE currently calls cpu_nap() while performing DHCP, in order to reduce CPU utilisation on virtual machines. Under mild broadcast load (~100 packets per second), this can cause received packets to be dropped because the receive descriptor ring is overrun before the next 18Hz timer interrupt wakes up the CPU. The result is that DHCP is likely to intermittently fail on networks with appreciable amounts of broadcast (or multicast) traffic. This behaviour was introduced in the series of commits which generalised the "dhcp" command to the "ifconf" command. The earlier code (which did not handle IPv6 configuration) had no call to cpu_nap() and so did not suffer from this problem. Fix by removing the call to cpu_nap() in ifpoller_progress(). This has the undesirable side effect that CPU utilisation will remain at 100% while waiting for DHCP to complete (which can take several seconds, if we have to wait around for potential ProxyDHCP offers to arrive). Reported-by: Alex Davies <adavies@jumptrading.com> Reported-by: Christoffer Stokbæk <christoffers@easyspeedy.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/ifmgmt.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/usr/ifmgmt.c b/src/usr/ifmgmt.c
index cab1cd91..3d05895c 100644
--- a/src/usr/ifmgmt.c
+++ b/src/usr/ifmgmt.c
@@ -28,7 +28,6 @@ FILE_LICENCE ( GPL2_OR_LATER );
#include <ipxe/device.h>
#include <ipxe/job.h>
#include <ipxe/monojob.h>
-#include <ipxe/nap.h>
#include <ipxe/timer.h>
#include <usr/ifmgmt.h>
@@ -142,9 +141,6 @@ struct ifpoller {
static int ifpoller_progress ( struct ifpoller *ifpoller,
struct job_progress *progress __unused ) {
- /* Reduce CPU utilisation */
- cpu_nap();
-
/* Hand off to current progress checker */
return ifpoller->progress ( ifpoller );
}