Patches for Pgsql on Linux/Alpha (RE: Last Call...)

Поиск
Список
Период
Сортировка
От Ryan Kirkpatrick
Тема Patches for Pgsql on Linux/Alpha (RE: Last Call...)
Дата
Msg-id Pine.LNX.4.02.9810301938510.346-100000@farstar.rkirkpat.net
обсуждение исходный текст
Ответы Re: [PATCHES] Patches for Pgsql on Linux/Alpha (RE: Last Call...)
Список pgsql-hackers
Ok, here they are, the long awaited patches to make pgsql compile
once again on Linux/Alpha. It turned out that our old friend S_LOCK was
the problem. Apparently some one had pulled the S_LOCK assembly code out
of the static function that I put it in, and attempted to make it inlined
again (which is what broke it the first time around). On a whim, I
searched the net looking for an Alpha Assembly Programmer's Manual, and
see if it would help me any. I was lucky on both accounts. I found the
manual, and quickly figured out to make local labels. So... The S_LOCK
code for Linux/Alpha is finally safe for inlining! :)Here is the patch for ./pgsql/src/include/storage/s_lock.h

89c87
<                  bne   $0, already_set     \n\
---
>                  bne   $0, 3f          \n\
91c89
<                  bne   $0, already_set     \n\
---
>                  bne   $0, 3f          \n\
94,95c92,93
<                  beq   $0, stqc_fail       \n\
<         success: bis   $31, $31, %1        \n\
---
>                  beq   $0, 2f              \n\
>                  bis   $31, $31, %1        \n\
97,100c95,98
<                  jmp   $31, end               \n\
<       stqc_fail: or    $31, 1, $0           \n\
<     already_set: bis   $0, $0, %1           \n\
<             end: nop      ": "=m"(*lock), "=r"(_res): :"0");
---
>                  jmp   $31, 4f               \n\
>               2: or    $31, 1, $0           \n\
>               3: bis   $0, $0, %1           \n\
>               4: nop      ": "=m"(*lock), "=r"(_res): :"0");
Though there are two other catches at the moment in compiling
pgsql on Alpha as well:
1. The optimization flag, -O2, that is used, causes some code to
fail to compile with very strange errors, and it causes s_locks to jam.
Apparently this is due to the (somewhat) unstable nature of gcc/egcs on
Alphas at the moment. Turning it down to -O1 solves the problem and
everything works fine.
2. C++ is pretty much broken on Linux/Alpha (Debian 2.0 at least),
due to missing header files. This means that libpq++ can't be compiled.
Either tell configure not to detect/use C++, or comment out the line in
interfaces/Makefile that causes libpq++ to be built.
Beyond that, it should compile, install, and initdb just fine.
Regressions tests are a mixed bag at this time (see my seperate message
concerning this), but look promising.Here is the specs on my machine for reference:

XL366 Alpha w/192MB of RAM
Debian 2.0 Alpha (unstable)
Linux 2.0.34
gcc 2.91.57-5
glibc 2.0.7t-1
I would be very interested in regression tests/results from
people running RedHat on thier Alphas. Would help me to narrow down what
is causing some of the regression test problems. If you do send them to
me, make sure to include what kernel, gcc, and glibc you are using.
Thanks.
Ok, that should pretty much cover it for the 6.4 release on the
Linux/Alpha end. I would mark it as working, but still in need of further
work. TTYAL.

----------------------------------------------------------------------------
|   "For to me to live is Christ, and to die is gain."                     |
|                                            --- Philippians 1:21 (KJV)    |
----------------------------------------------------------------------------
|  Ryan Kirkpatrick  |  Boulder, Colorado  | rkirkpat@nag.cs.colorado.edu  |
----------------------------------------------------------------------------
|               http://www-ugrad.cs.colorado.edu/~rkirkpat/                |
----------------------------------------------------------------------------



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Ryan Kirkpatrick
Дата:
Сообщение: Linux/Alpha Regression tests....
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [PATCHES] Patches for Pgsql on Linux/Alpha (RE: Last Call...)