Re: [pgsql-advocacy] [HACKERS] [GENERAL] Postgresql AMD x86-64

2003-07-21 Thread Peter Eisentraut
Bruce Momjian writes:

 The following patch automatically enables 64-bit mode on AMD opteron.
 We already had spinlock support for it, but I added some comments.

This sort of thing belongs into the template file, not directly in
configure.in.

-- 
Peter Eisentraut   [EMAIL PROTECTED]

---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


Re: [pgsql-advocacy] [HACKERS] [GENERAL] Postgresql AMD x86-64

2003-07-21 Thread Bruce Momjian
Peter Eisentraut wrote:
 Bruce Momjian writes:
 
  The following patch automatically enables 64-bit mode on AMD opteron.
  We already had spinlock support for it, but I added some comments.
 
 This sort of thing belongs into the template file, not directly in
 configure.in.

I knew you were going to say that, but which template file?  It is a
product of the cpu/compiler, not a specific OS.

-- 
  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: [pgsql-advocacy] [HACKERS] [GENERAL] Postgresql AMD x86-64

2003-07-19 Thread Bruce Momjian
Manfred Spraul wrote:
 Bruce Momjian wrote:
 
   if test $enable_debug = yes  test $ac_cv_prog_cc_g = yes; then
 CFLAGS=$CFLAGS -g
   fi
 + 
 + /* Compile AMD Opteron using gcc in 64-bit mode */
 + if test $GCC = yes; then
 + case $host in
 +   ia64-*)  CFLAGS=$CFLAGS -m64
 +LDFLAGS=$LDFLAGS -melf_x86_64;;
 + esac
 + fi
 + 
 
 Sorry, I think I confused you:

I am easily confused.  It certainly makes more sense fir ia64 to be
Intel, not AMD. :-)

 ia64-* is Intel's Itanium system. They are 64-bit only cpus (the 32-bit 
 emulation is too slow to be usable). It's supported by multiple 
 operating systems, among them HP UX, Linux, Windows. As far as I can see 
 it's supported directly, by 7.3.3, at least RedHat builds their ia64 
 version without any patches.
 x86_64 is AMD's Operon/Athlon 64 system. They support concurrent 32-bit 
 and 64-bit. Right now only supported by Linux, BSD and Windows support 
 expected soon.
 Thus the test must be for x86_64-*.
 
 Martin: you are using debian-testing, correct? I've asked a Suse 
 developer, and on their Linux distribution, -m64 is the default, i.e. 
 you don't need any switches.

I have applied the following patch to document the cpus supported by
each define.

Martin mentioned that he has applied a special 64-bit kit to do the
compile, so perhaps he needs it, but most will not.  I will keep the
patch around and see if others need it during beta. 

-- 
  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
Index: src/include/storage/s_lock.h
===
RCS file: /cvsroot/pgsql-server/src/include/storage/s_lock.h,v
retrieving revision 1.109
diff -c -c -r1.109 s_lock.h
*** src/include/storage/s_lock.h24 Jun 2003 23:20:08 -  1.109
--- src/include/storage/s_lock.h19 Jul 2003 14:10:19 -
***
*** 94,100 
   */
  
  
! #if defined(__i386__) || defined(__x86_64__) 
  #define TAS(lock) tas(lock)
  
  static __inline__ int
--- 94,100 
   */
  
  
! #if defined(__i386__) || defined(__x86_64__) /* AMD Opteron */
  #define TAS(lock) tas(lock)
  
  static __inline__ int
***
*** 113,118 
--- 113,119 
  #endif /* __i386__ || __x86_64__ */
  
  
+ /* Intel Itanium */
  #ifdef __ia64__
  #define TAS(lock) tas(lock)
  

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly


Re: [pgsql-advocacy] [HACKERS] [GENERAL] Postgresql AMD x86-64

2003-07-18 Thread Manfred Spraul
Bruce Momjian wrote:

 if test $enable_debug = yes  test $ac_cv_prog_cc_g = yes; then
   CFLAGS=$CFLAGS -g
 fi
+ 
+ /* Compile AMD Opteron using gcc in 64-bit mode */
+ if test $GCC = yes; then
+ case $host in
+   ia64-*)  CFLAGS=$CFLAGS -m64
+LDFLAGS=$LDFLAGS -melf_x86_64;;
+ esac
+ fi
+ 

Sorry, I think I confused you:
ia64-* is Intel's Itanium system. They are 64-bit only cpus (the 32-bit 
emulation is too slow to be usable). It's supported by multiple 
operating systems, among them HP UX, Linux, Windows. As far as I can see 
it's supported directly, by 7.3.3, at least RedHat builds their ia64 
version without any patches.
x86_64 is AMD's Operon/Athlon 64 system. They support concurrent 32-bit 
and 64-bit. Right now only supported by Linux, BSD and Windows support 
expected soon.
Thus the test must be for x86_64-*.

Martin: you are using debian-testing, correct? I've asked a Suse 
developer, and on their Linux distribution, -m64 is the default, i.e. 
you don't need any switches.

--
   Manfred
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster


Re: [pgsql-advocacy] [HACKERS] [GENERAL] Postgresql AMD x86-64

2003-07-08 Thread Bruce Momjian

The s_lock.h change will be in 7.4.

---

Tom Lane wrote:
 Martin D. Weinberg [EMAIL PROTECTED] writes:
  I didn't change the source tree at all.  I used:
 
  env CFLAGS='-O3 -m64' LD='/usr/bin/ld -melf_x86_64' ./configure --with-CXX 
  --without-zlib
 
 BTW, see Jeff Baker's nearby report in pgsql-general that s_lock.h needs
 to be tweaked to use spinlocks on this platform.  If you're using
 semaphores instead then you're taking a big performance hit.
 
   regards, tom lane
 
 ---(end of broadcast)---
 TIP 5: Have you checked our extensive FAQ?
 
 http://www.postgresql.org/docs/faqs/FAQ.html
 

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