Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Apr 2007 08:53:41 -0700
From:      Tim Kientzle <kientzle@freebsd.org>
To:        Peter Jeremy <peterjeremy@optushome.com.au>
Cc:        Suleiman Souhlal <ssouhlal@freebsd.org>, current@freebsd.org
Subject:   Re: Suggestions on Avoiding syscall Overhead
Message-ID:  <4630CB05.8090901@freebsd.org>
In-Reply-To: <20070426102420.GA819@turion.vk2pj.dyndns.org>
References:  <f126fae00704221639l68095de1ye7ce9ba3d921bf20@mail.gmail.com>	<20070423113400.GC28587@gw.humppa.dk>	<2018ADA6-11D5-48D1-98BD-4397A60E14AF@FreeBSD.org> <20070426102420.GA819@turion.vk2pj.dyndns.org>

next in thread | previous in thread | raw e-mail | index | archive | help
>IMHO, the main usage of the global readonly page is (apart from  
>faster gettimeofday and similar) is that you can put the syscall  
>entry function in it...

This is unnecessary, though.  Put multiple syscall entry
options in libc and query the kernel once to find out which
one(s) are supported.  That's a lot simpler than mapping a global page.
For that matter, if the alternative syscall mechanisms fail
nicely, just have libc try each one to see which are supported.

> I think that FreeBSD should make more use of CPU-specific coding to
> enhance performance.  Maybe even something along the lines of Solaris
> where linking to libc implicitly links to a CPU-specific .so if it
> exists.

This isn't a bad idea.  It should also be relatively easy to
implement (a minor change to rtld), though rebuilding libc
many times with different compiler options would slow builds
noticably.

An alternative would be to provide a build option
that checks the local processor and optimizes for that, so
that a system build would either be "Generic" (for many systems)
or "Local" (optimized for the local processor).  Then anyone
who wanted better performance could just rebuild the system.

However, first it would be good to see some application-level
benchmarks to see if this really helps.  Sure, a program that
does a billion strcpy() operations in a tight loop might benefit,
but does MySQL run any faster?

Tim Kientzle



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