From owner-freebsd-hackers Thu Dec 5 2: 7:37 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0A58537B401 for ; Thu, 5 Dec 2002 02:07:35 -0800 (PST) Received: from pcwin002.win.tue.nl (pcwin002.win.tue.nl [131.155.71.72]) by mx1.FreeBSD.org (Postfix) with ESMTP id 01DD043EA9 for ; Thu, 5 Dec 2002 02:07:34 -0800 (PST) (envelope-from stijn@pcwin002.win.tue.nl) Received: from pcwin002.win.tue.nl (localhost [127.0.0.1]) by pcwin002.win.tue.nl (8.12.6/8.12.6) with ESMTP id gB5A7Wmr056686; Thu, 5 Dec 2002 11:07:32 +0100 (CET) (envelope-from stijn@pcwin002.win.tue.nl) Received: (from stijn@localhost) by pcwin002.win.tue.nl (8.12.6/8.12.6/Submit) id gB5A7WUY056685; Thu, 5 Dec 2002 11:07:32 +0100 (CET) Date: Thu, 5 Dec 2002 11:07:32 +0100 From: Stijn Hoop To: Terry Lambert Cc: hackers@freebsd.org Subject: Re: [nephtes@openface.ca: [Xmame] Use of usleep() with -sleepidle] Message-ID: <20021205100732.GC56010@pcwin002.win.tue.nl> References: <20021202151816.GJ83264@pcwin002.win.tue.nl> <20021202114019.R31106-100000@patrocles.silby.com> <20021204113154.GA205@pcwin002.win.tue.nl> <3DEE4418.868B4936@mindspring.com> <20021204191125.GG52541@pcwin002.win.tue.nl> <3DEE58C6.19ACF59C@mindspring.com> <20021205085604.GB56010@pcwin002.win.tue.nl> <3DEF2340.C4AEED1A@mindspring.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="DIOMP1UsTsWJauNi" Content-Disposition: inline In-Reply-To: <3DEF2340.C4AEED1A@mindspring.com> User-Agent: Mutt/1.4i X-Bright-Idea: Let's abolish HTML mail! Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --DIOMP1UsTsWJauNi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 05, 2002 at 01:58:24AM -0800, Terry Lambert wrote: > Stijn Hoop wrote: > > I'd argue it isn't flawed for the measuring it is supposed to do - name= ly > > the overhead for the various _sleep functions. Care to tell me why it is > > flawed according to you? >=20 > Because it measures the API one way, but the code uses it another. > The results you get are not predictive of the code that you are > going to be running. But the code is going to use the _sleep functions as used in the benchmark -- to sleep for less than 10 ms (which evidently makes no sense on a default FreeBSD system, as pointed out by the results). > Well, really, something that requires RT performance should be in > the kernel. That's why we put interrupt handlers there. 8-). /me ponders having an option XMAME in the kernel.... nah, lets not go there= :) > Probably the place to do this is in the POSIX RT scheduling; if > the RT scheduling is active (meaning a process has called it, and > that process is still running), it's probably a reasonable thing > to crank up the Hz. This would make it self-adjusting, and also > self-healing, so that you could safely degrade the overall system > performance by intentionally running your application, but not > otherwise. That's a good suggestion, but how many OSs implement those? Where can I learn more about them? Any open standards? > Note that if this were implemented, it would mean your benchmark > is still broken, because it doesn't call the necessary interfaces. ? I don't get this. > Another alternative would be a nanosleep call with an argument below > a certain value. I would hesitate to do it that way, though, since > I think that it ought to take a priviledged program to do the evil > deed, given the impact on the rest of the system. And that would sleep less than 10ms on average? --Stijn --=20 SIGSIG -- signature too long (core dumped) --DIOMP1UsTsWJauNi Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE97yVkY3r/tLQmfWcRAklhAJ9uEIyewyedCqh1+ugQ8Ncv8tqZAgCfaMyO zuMTk2InHOkz1Js0mnDmx/w= =3s9u -----END PGP SIGNATURE----- --DIOMP1UsTsWJauNi-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message