Re: [PATCHES] Reorganization of spinlock defines

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [PATCHES] Reorganization of spinlock defines
Дата
Msg-id 200309121356.h8CDue011694@candle.pha.pa.us
обсуждение исходный текст
Список pgsql-hackers
Bruce Momjian wrote:
> Prompted by confusion over Itanium/Opterion, I have written a patch to
> improve the way we define spinlocks for platforms and cpu's.  It
> basically decouples the OS from the CPU spinlock code.  In almost all
> cases, the spinlock code cares only about the compiler and CPU, not the
> OS.
> 
> The patch:
> 
>     o defines HAS_TEST_AND_SET inside each spinlock routine, not in
>       platform-specific files
>     o moves slock_t defines into the spinlock routines
>     o remove NEED_{CPU}_TAS_ASM define because it is no longer needed
>     o reports a compile error if spinlocks are not defined
>     o adds a configure option --without-spinlocks to allow
>       non-spinlock compiles

OK, we have to decide which parts of this patch we want added.  I think
there was agreement that we want this part for 7.4:

>     o reports a compile error if spinlocks are not defined
>     o adds a configure option --without-spinlocks to allow
>       non-spinlock compiles

Now, do we also want to centralize the cpu tests in s_lock.h, or try to
patch up the include/port/*.h files for Opteron/Itanium.  If you look in
freebsd.h, for example, you will see we basically try to duplicate the
cpu tests done in s_lock.h.  To get this working, we would need to add
Itanium/Opteron tests there, and add i386 tests in other platforms that
previously supported only i386 and add Opteron/Itanium.

Or we could just apply the entire patch.

I am going to get some folks to test the patch today on a few platforms
to see how it works for them.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


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

Предыдущее
От: Jan Wieck
Дата:
Сообщение: Re: Another small bug (pg_autovacuum)
Следующее
От: "Marc G. Fournier"
Дата:
Сообщение: Re: [PATCHES] Reorganization of spinlock defines