Re: [HACKERS] [PATCHES] Reorganization of spinlock defines
On Thu, 11 Sep 2003, Bruce Momjian wrote: > I just learned from Larry that Unixware defines intel as i386, not > __i386 or __i386__, at least of the native SCO compiler that he uses. could we put something in the various port files to standardize this? ie. in unixware.h, add somethinglike: #ifdef i386 #define __i386__ #endif just so that 'special cases' are centralized in the ports file, and the mainstream code doesn't have: #if defined(i386) || defined(__i386) || defined(__i386__) ? ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [HACKERS] [PATCHES] Reorganization of spinlock defines
--On Thursday, September 11, 2003 23:13:54 -0400 Tom Lane <[EMAIL PROTECTED]> wrote: Larry Rosenman <[EMAIL PROTECTED]> writes: Bruce sent me a copy of the patch, and it BREAKS UnixWare (If y'all= =20 care). Unfixably? Or just a small oversight? I'm actually not worried about platforms that are actively being tested. It's the stuff that hasn't been confirmed recently that is going to be at risk. I'm seeing failures with the 2nd patch as well. Seems like it's not liking UnixWare's cc defines. the documentation is at: http://www.lerctr.org:8458/ the cc man page is at: http://www.lerctr.org:8458/en/man/html.1/cc.1.html Tom, You still have an account here. Bruce, if you'd like an account, that is easily arranged. LER regards, tom lane -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 972-414-9812 E-Mail: [EMAIL PROTECTED] US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749 pgp0.pgp Description: PGP signature
Re: [HACKERS] [PATCHES] Reorganization of spinlock defines
Tom Lane wrote: > Larry Rosenman <[EMAIL PROTECTED]> writes: > > Bruce sent me a copy of the patch, and it BREAKS UnixWare (If y'all= > > =20 > > care). > > Unfixably? Or just a small oversight? > > I'm actually not worried about platforms that are actively being tested. > It's the stuff that hasn't been confirmed recently that is going to be > at risk. I sent him a new patch just now. -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html
Re: [HACKERS] [PATCHES] Reorganization of spinlock defines
Tom Lane wrote: > Larry Rosenman <[EMAIL PROTECTED]> writes: > > Bruce sent me a copy of the patch, and it BREAKS UnixWare (If y'all= > > =20 > > care). > > Unfixably? Or just a small oversight? Updated patch now works on Unixware. -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [HACKERS] [PATCHES] Reorganization of spinlock defines
Marc G. Fournier wrote: > > On Thu, 11 Sep 2003, Bruce Momjian wrote: > > > I just learned from Larry that Unixware defines intel as i386, not > > __i386 or __i386__, at least of the native SCO compiler that he uses. > > could we put something in the various port files to standardize this? ie. > in unixware.h, add somethinglike: > > #ifdef i386 > #define __i386__ > #endif > > just so that 'special cases' are centralized in the ports file, and the > mainstream code doesn't have: > > #if defined(i386) || defined(__i386) || defined(__i386__) Yep, that's what Tom wants and I am doing that now. I sent a patch to Larry for testing. -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
Re: [HACKERS] [PATCHES] Reorganization of spinlock defines
--On Friday, September 12, 2003 00:00:43 -0400 Tom Lane <[EMAIL PROTECTED]> wrote: Larry Rosenman <[EMAIL PROTECTED]> writes: Please, only the first two. Make the Unixware template add __i386__. Don't add assumptions about valid user-namespace symbols. that's reasonable. At least until 64-bit UnixWare. :-) Even then, I'd prefer to put the necessary kluge into template/unixware or Makefile.unixware or port/unixware.h, rather than add a risky assumption globally. Sure, and 64-bit UnixWare is 2 years out any way. Hopefully we can get reasonableness by then. I've already sent a whine-a-gram to the compiler guys at SCO. LER regards, tom lane -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 972-414-9812 E-Mail: [EMAIL PROTECTED] US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749 pgp0.pgp Description: PGP signature
Re: [HACKERS] [PATCHES] Reorganization of spinlock defines
--On Friday, September 12, 2003 00:06:49 -0400 Tom Lane <[EMAIL PROTECTED]> wrote: Larry Rosenman <[EMAIL PROTECTED]> writes: I've already sent a whine-a-gram to the compiler guys at SCO. Prolly you thought of this already, but: getting them to *add* an implicit #define of __i386__ should be plenty easy compared to getting them to *remove* the one for i386. And while I think they should remove the latter, the immediate problem would be solved as soon as they add the former. sure, and I expect that's what they may do. We'll see what they say. LER regards, tom lane -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 972-414-9812 E-Mail: [EMAIL PROTECTED] US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749 pgp0.pgp Description: PGP signature
Re: [HACKERS] [PATCHES] Reorganization of spinlock defines
Marc G. Fournier wrote: > > > On Thu, 11 Sep 2003, Bruce Momjian wrote: > > > Well, the problem was that we defined HAS_TEST_AND_SET inside the ports. > > I guess we could splatter a test for Itanium and Opterion in every port > > that could possibly use it, but then again, if we fall back to not > > finding it for some reason, we don't get a report because we silently > > fall back to semaphores. That's what has me worried, that if we don't > > do it, we will not know what platforms really aren't working properly. > > >From what I understand, "not working properly" means slow, not broken, no? > Which means ppl could submit a problem report and it could be fixed for > v7.4.1 ... its not so much 'not working properly' as it is 'not optimal > performance' ... Right, though I am not sure people will know _slow_ configuration vs. PostgreSQL is slow. -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(end of broadcast)--- TIP 8: explain analyze is your friend
Re: [HACKERS] [PATCHES] Reorganization of spinlock defines
Larry Rosenman <[EMAIL PROTECTED]> writes: > I've already sent a whine-a-gram to the compiler guys at SCO. Prolly you thought of this already, but: getting them to *add* an implicit #define of __i386__ should be plenty easy compared to getting them to *remove* the one for i386. And while I think they should remove the latter, the immediate problem would be solved as soon as they add the former. regards, tom lane ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [HACKERS] [PATCHES] Reorganization of spinlock defines
Larry Rosenman <[EMAIL PROTECTED]> writes: >> Please, only the first two. Make the Unixware template add __i386__. >> Don't add assumptions about valid user-namespace symbols. > that's reasonable. At least until 64-bit UnixWare. :-) Even then, I'd prefer to put the necessary kluge into template/unixware or Makefile.unixware or port/unixware.h, rather than add a risky assumption globally. regards, tom lane ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings
Re: [HACKERS] [PATCHES] Reorganization of spinlock defines
--On Thursday, September 11, 2003 23:42:53 -0400 Tom Lane <[EMAIL PROTECTED]> wrote: Bruce Momjian <[EMAIL PROTECTED]> writes: Looking at the code, I wonder if we already have folks not using spinlocks, and not even knowing it. I don't think problem reports will be limited to new platforms. Very likely --- I heard from someone recently who was trying to run HPUX/Itanium. After we got past the hard-wired assumption that HPUX == HPPA, it was still giving lousy performance for lack of spinlocks. I like the part of the patch that is in-your-face about that. I just learned from Larry that Unixware defines intel as i386, not __i386 or __i386__, at least of the native SCO compiler that he uses. [blink] Namespace infringement 'r us, huh? Yeah. I **DO** have SCO's ear on it, but I don't know how far I'll get, plus there are TONS of pre-whenever-we-get-it-fixed out there. I am going to test for __cpu, __cpu__, and cpu on non-gcc compiler for consistency. It is only done in one place in the patch, so that should be good. Please, only the first two. Make the Unixware template add __i386__. Don't add assumptions about valid user-namespace symbols. that's reasonable. At least until 64-bit UnixWare. :-) (announced at SCOForum). regards, tom lane ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html -- Larry Rosenman http://www.lerctr.org/~ler Phone: +1 972-414-9812 E-Mail: [EMAIL PROTECTED] US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749 pgp0.pgp Description: PGP signature
Re: [HACKERS] [PATCHES] Reorganization of spinlock defines
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > Looking at the code, I wonder if we already have folks not using > > spinlocks, and not even knowing it. I don't think problem reports will > > be limited to new platforms. > > Very likely --- I heard from someone recently who was trying to run > HPUX/Itanium. After we got past the hard-wired assumption that HPUX > == HPPA, it was still giving lousy performance for lack of spinlocks. > I like the part of the patch that is in-your-face about that. > > > I just learned from Larry that Unixware defines intel as i386, not > > __i386 or __i386__, at least of the native SCO compiler that he uses. > > [blink] Namespace infringement 'r us, huh? > > > I am going to test for __cpu, __cpu__, and cpu on non-gcc compiler for > > consistency. It is only done in one place in the patch, so that should > > be good. > > Please, only the first two. Make the Unixware template add __i386__. > Don't add assumptions about valid user-namespace symbols. Roger! -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [HACKERS] [PATCHES] Reorganization of spinlock defines
Bruce Momjian <[EMAIL PROTECTED]> writes: > Looking at the code, I wonder if we already have folks not using > spinlocks, and not even knowing it. I don't think problem reports will > be limited to new platforms. Very likely --- I heard from someone recently who was trying to run HPUX/Itanium. After we got past the hard-wired assumption that HPUX == HPPA, it was still giving lousy performance for lack of spinlocks. I like the part of the patch that is in-your-face about that. > I just learned from Larry that Unixware defines intel as i386, not > __i386 or __i386__, at least of the native SCO compiler that he uses. [blink] Namespace infringement 'r us, huh? > I am going to test for __cpu, __cpu__, and cpu on non-gcc compiler for > consistency. It is only done in one place in the patch, so that should > be good. Please, only the first two. Make the Unixware template add __i386__. Don't add assumptions about valid user-namespace symbols. regards, tom lane ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html
Re: [HACKERS] [PATCHES] Reorganization of spinlock defines
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > Yes, we could do just the configure warning, then plaster tests into the > > port files to try to hit all the opteron/itanium cases. I am a little > > concerned that this might throw up a bunch of problem cases that we will > > patching for a while. > > Probably so --- but we'd only be breaking new platforms that people are > starting to use, not old ones that might not be getting tested > regularly. Looking at the code, I wonder if we already have folks not using spinlocks, and not even knowing it. I don't think problem reports will be limited to new platforms. > Understand that I'm not dead set against applying this patch for 7.4. > (On a code-cleanliness point of view I favor it.) What I want is some > open discussion about the risks and benefits before we decide. Sure, and I am not pushing the patch. I am just saying it would have been ideal a few weeks ago --- I am not sure if we are worse off with or without it. I just learned from Larry that Unixware defines intel as i386, not __i386 or __i386__, at least of the native SCO compiler that he uses. What the code used to do is define NEED_I386_TAS_ASM unconditionally on some platforms (negating the need to test for a compiler symbol) or test for each platform compiler symbol (and not test all possible ways it could be specified), like FreeBSD did. That's why things are so messy. I am going to test for __cpu, __cpu__, and cpu on non-gcc compiler for consistency. It is only done in one place in the patch, so that should be good. -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [HACKERS] [PATCHES] Reorganization of spinlock defines
Bruce Momjian <[EMAIL PROTECTED]> writes: > Yes, we could do just the configure warning, then plaster tests into the > port files to try to hit all the opteron/itanium cases. I am a little > concerned that this might throw up a bunch of problem cases that we will > patching for a while. Probably so --- but we'd only be breaking new platforms that people are starting to use, not old ones that might not be getting tested regularly. Understand that I'm not dead set against applying this patch for 7.4. (On a code-cleanliness point of view I favor it.) What I want is some open discussion about the risks and benefits before we decide. regards, tom lane ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
Re: [HACKERS] [PATCHES] Reorganization of spinlock defines
Tom Lane wrote: > Bruce Momjian <[EMAIL PROTECTED]> writes: > > I guess we could splatter a test for Itanium and Opterion in every port > > that could possibly use it, but then again, if we fall back to not > > finding it for some reason, we don't get a report because we silently > > fall back to semaphores. That's what has me worried, that if we don't > > do it, we will not know what platforms really aren't working properly. > > Agreed, the silent fallback to semaphores isn't such a hot idea in > hindsight. But the part of the patch that requires a configure option > to use that code path could be applied without touching anything else. Yes, we could do just the configure warning, then plaster tests into the port files to try to hit all the opteron/itanium cases. I am a little concerned that this might throw up a bunch of problem cases that we will patching for a while. -- Bruce Momjian| http://candle.pha.pa.us [EMAIL PROTECTED] | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup.| Newtown Square, Pennsylvania 19073 ---(end of broadcast)--- TIP 8: explain analyze is your friend
Re: [HACKERS] [PATCHES] Reorganization of spinlock defines
Larry Rosenman <[EMAIL PROTECTED]> writes: > Bruce sent me a copy of the patch, and it BREAKS UnixWare (If y'all= > =20 > care). Unfixably? Or just a small oversight? I'm actually not worried about platforms that are actively being tested. It's the stuff that hasn't been confirmed recently that is going to be at risk. regards, tom lane ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings