Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Dec 2002 11:07:32 +0100
From:      Stijn Hoop <stijn@win.tue.nl>
To:        Terry Lambert <tlambert2@mindspring.com>
Cc:        hackers@freebsd.org
Subject:   Re: [nephtes@openface.ca: [Xmame] Use of usleep() with -sleepidle]
Message-ID:  <20021205100732.GC56010@pcwin002.win.tue.nl>
In-Reply-To: <3DEF2340.C4AEED1A@mindspring.com>
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>

next in thread | previous in thread | raw e-mail | index | archive | help

--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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021205100732.GC56010>