Subject: Re: PostgreSQL 7.2.1 - fix, but who needs to know ?
To: Jason R Thorpe <thorpej@wasabisystems.com>
From: David Brownlee <abs@netbsd.org>
List: port-cobalt
Date: 06/13/2002 14:33:15
On Wed, 12 Jun 2002, Jason R Thorpe wrote:
> On Wed, Jun 12, 2002 at 10:15:50AM +0100, David Brownlee wrote:
>
> > Presumably the kernel can determine at runtime whether the
> > current CPU supports the atomic TAS instructions?
>
> Beyond taking an illegal insn trap, no. Or having a table of models that
> don't support it (no mips1 supports it, almost all mips3, mips32, mips64,
> etc. CPUs support it, except for a few).
>
It feels like a generically useful thing to be exported to
userland. Would it make sense for the kernel to test for that
trap during autoconfig?
> > If it exported this information via a machdep sysctl then we could
> > have 'MIPS1' and 'LL/SC' versions of the operations in separate
> > libraries and then select between them in ld.so.conf (similar to
> > i386 with libm387.so.0).
>
> We need to solve this problem for the new pthread library, too. I think
> the solution there was to use restartable sequences on CPUs which don't
> have the LL/SC insns. (Though, the solution has not yet been implemented.)
Is there any sense in having libc atomic TAS functions which can
be implemented using the lowest common denominator on each arch,
and then overridden with the ld.so.conf sysctl check where
appropriate, or is that too much overhead?
--
David/absolute -- www.netbsd.org: No hype required --