Re: spinlocks on powerpc
От | Manabu Ori |
---|---|
Тема | Re: spinlocks on powerpc |
Дата | |
Msg-id | 892AF2DE-F6DC-463B-A9D2-87FC8B748E61@gmail.com обсуждение исходный текст |
Ответ на | Re: spinlocks on powerpc (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: spinlocks on powerpc
|
Список | pgsql-hackers |
Tom, thank you for your advise. On 2012/01/01, at 3:39, Tom Lane wrote: > What I suggest we should do about this is provide an overridable option > in pg_config_manual.h, along the lines of > > #if defined(__ppc64__) || defined(__powerpc64__) > #define USE_PPC_LWARX_MUTEX_HINT > #endif > > and then test that symbol in s_lock.h. This will provide an escape > hatch for anyone who doesn't want the decision tied to 64-bit-ness, > while still enabling the option automatically for the majority of > people who could use it. Fair enough. I recreated the patch as you advised. > BTW, while reading the ISA document I couldn't help noticing that LWARX > is clearly specified to operate on 4-byte quantities (there's LDARX if > you want to use 8-byte). Which seems to mean that this bit in s_lock.h > just represents bogus waste of space: > > #if defined(__ppc64__) || defined(__powerpc64__) > typedef unsigned long slock_t; > #else > typedef unsigned int slock_t; > #endif > > Shouldn't we just make slock_t be "int" for both PPC and PPC64? I'd like it to be untouched for this TAS_SPIN for powerpc discussion, since it seems it remainds like this for several years and maybe it needs some more careful consideration especially for sign extension… Regards, Manabu Ori
Вложения
В списке pgsql-hackers по дате отправления: