Skip site navigation (1) Skip section navigation (2)

Re: FIX: NetBSD/cobalt now compiles 7.2.1

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: rmurray(at)debian(dot)org
Cc: Warwick Hunter <whunter(at)agile(dot)tv>,Ian Spray <pgsql(at)borg(dot)minimal(dot)cx>, pgsql-ports(at)postgresql(dot)org,Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
Subject: Re: FIX: NetBSD/cobalt now compiles 7.2.1
Date: 2002-06-12 14:06:10
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-ports
rmurray(at)debian(dot)org writes:
> On Tue, Jun 11, 2002 at 02:05:34PM -0400, Tom Lane wrote:
>> The s_lock change is in current sources, but it concerns me because it
>> seems it could break other mips-based platforms (ie, pre-mips2).  I'd

> The Linux kernel will emulate ll/sc on mips1 platforms.  If other kernels
> won't/don't do this, then this should be made Linux/mips specific.

That's exactly the answer I did *not* want to hear.  The entire reason
why we bother with TAS assembly coding is to avoid a trip to the kernel
for low-level synchronization operations.  If the existing s_lock coding
incurs a protection fault and kernel emulation on MIPS1 machines, then
it's worse than useless.

What I'm currently thinking is that we should undo the s_lock change and
add appropriate coding into the template files for all MIPS-capable
platforms to select "-mips2" where appropriate.  Thoughts?  It's not
real clear to me what the difference is that is actually created by
either the assembler directive or the compiler flag; can someone give
exact details?

> Prebuilt binaries provided by distributions like Debian often build for the
> lowest common ISA that will work on all of the available hardware, so every
> binary in the distribution is built for mips1, with the addition of ll/sc,
> being emulated by the kernel, or done in hardware (if available)

That is probably not going to be acceptable from a performance point of
view.  Note the comment in s_lock.h about 40% penalty for
non-hardware-based spinlocks; if anything the number is probably worse

			regards, tom lane

In response to


pgsql-ports by date

Next:From: rmurrayDate: 2002-06-13 18:24:56
Subject: Re: FIX: NetBSD/cobalt now compiles 7.2.1
Previous:From: rmurrayDate: 2002-06-11 18:34:02
Subject: Re: FIX: NetBSD/cobalt now compiles 7.2.1

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group