Re: [PATCHES] Reorganization of spinlock defines

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: [PATCHES] Reorganization of spinlock defines
Дата
Msg-id 200309120252.h8C2qFg22449@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: [PATCHES] Reorganization of spinlock defines  ("Marc G. Fournier" <scrappy@postgresql.org>)
Ответы Re: [PATCHES] Reorganization of spinlock defines  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: [PATCHES] Reorganization of spinlock defines  ("Marc G. Fournier" <scrappy@postgresql.org>)
Список pgsql-hackers
Marc G. Fournier wrote:
> > But it seems to me that this is mostly a cosmetic cleanup and therefore
> > not the kind of thing to be doing late in beta.  Couldn't we do
> > something that affects only Opteron/Itanium and doesn't take a chance
> > on breaking everything else?
>
> I just went through the whole patch myself, and as much as I like the
> overall simplification, I tend to agree with Tom here on questioning the
> requirement to do suck a massive change so late in the end cycle ... is
> there no smaller bandaid that can be applied to handle the Opteron/Itanium
> issue for v7.4, with the "cleanup patch" being applied right away after
> v7.4?

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.

Take FreeBSD for example, that couldn't find Opteron. It lists every
cpu like this:

    #if defined(__i386__)
    #define NEED_I386_TAS_ASM
    #define HAS_TEST_AND_SET
    typedef unsigned char slock_t;
    #endif

    #if defined(__sparc__)
    #define NEED_SPARC_TAS_ASM
    #define HAS_TEST_AND_SET
    typedef unsigned char slock_t;
    #endif

We would have to add an opteron/itanium to port that does this, but if
we miss some opteron/itanium define, we might never know because of the
silent fallback.

I don't care if we save it for 7.5 --- I just don't know how we will be
sure we have things working properly without it.

We could apply it tomorrow and see how things look on Monday.


--
  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, Pennsylvania 19073

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

Предыдущее
От: "Marc G. Fournier"
Дата:
Сообщение: Re: [PATCHES] Reorganization of spinlock defines
Следующее
От: Larry Rosenman
Дата:
Сообщение: Re: [PATCHES] Reorganization of spinlock defines