From owner-freebsd-net@FreeBSD.ORG Mon May 12 06:53:34 2003 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0CF9237B401 for ; Mon, 12 May 2003 06:53:34 -0700 (PDT) Received: from mail.sandvine.com (sandvine.com [199.243.201.138]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3F07743FBD for ; Mon, 12 May 2003 06:53:33 -0700 (PDT) (envelope-from don@sandvine.com) Received: by mail.sandvine.com with Internet Mail Service (5.5.2653.19) id ; Mon, 12 May 2003 09:53:32 -0400 Message-ID: From: Don Bowman To: 'Bruce Evans' , Don Bowman Date: Mon, 12 May 2003 09:53:29 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" cc: freebsd-net@freebsd.org Subject: RE: polling(4) and idle time/cpu usage percentages X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 May 2003 13:53:34 -0000 From: Bruce Evans [mailto:bde@zeta.org.au] > On Sun, 11 May 2003, Don Bowman wrote: > > > From: Bruce Evans [mailto:bde@zeta.org.au] > > > Did you try my hack? > > > > I tried the hack, as below. The other thing that makes idle > > wildly inaccurate is the symmetric multi-threading on the xeon > > (aka hyperthreading). > > The variable needs to be per-cpu for the SMP case. Perhaps there > are other complications for SMP (from having to forward clock > interrupts). > Hyperthreading might increase them. Anyway, get the !SMP case working > first. ... Thanks very much for the feedback. As you say, I had neglected to put a call in to poll in the smp idle loop. This is slightly more complicated. I'll work on getting the idle poll called in the smp case and make the changes you suggested and see where that gets me. thanks again! --don