From: | Dilip Kumar <dilipbalaut(at)gmail(dot)com> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>, Merlin Moncure <mmoncure(at)gmail(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, YUriy Zhuravlev <u(dot)zhuravlev(at)postgrespro(dot)ru>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Move PinBuffer and UnpinBuffer to atomics |
Date: | 2016-03-30 01:43:16 |
Message-ID: | CAFiTN-tYUsKzbTC6L5rM_2T8vGDkZO3S-+LAYS+S4_wMnS+yRA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Mar 29, 2016 at 10:43 PM, Andres Freund <andres(at)anarazel(dot)de> wrote:
> My gut feeling is that we should do both 1) and 2).
>
> Dilip, could you test performance of reducing ppc's spinlock to 1 byte?
> Cross-compiling suggest that doing so "just works". I.e. replace the
> #if defined(__ppc__) typedef from an int to a char.
>
I set that, but after that it hangs, even Initdb hangs..
int
│164 s_lock(volatile slock_t *lock, const char *file, int line)
│165 {
│166 SpinDelayStatus delayStatus;
│167
│168 init_spin_delay(&delayStatus, (Pointer)lock, file,
line);
│169
* │170 while (TAS_SPIN(lock))
*
* │171 {
*
* >│172 make_spin_delay(&delayStatus);
*
* │173 } *
│174
I did not try to find the reason, but just built in debug mode and found it
never come out of this loop.
I clean build multiple times but problem persist,
Does it have dependency of some other variable of defined under PPC in some
other place ? I don't know..
/* PowerPC */
*#if* defined(__ppc__) || defined(__powerpc__) || defined(__ppc64__) ||
defined(__powerpc64__)
*#define* HAS_TEST_AND_SET
*typedef* *unsigned* *int* slock_t; --> changed like this
*#define* TAS(lock) tas(lock)
--
Regards,
Dilip Kumar
EnterpriseDB: http://www.enterprisedb.com
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2016-03-30 01:47:00 | Re: [COMMITTERS] pgsql: Allow to_timestamp(float8) to convert float infinity to timestam |
Previous Message | Robert Haas | 2016-03-30 01:38:14 | Re: VS 2015 support in src/tools/msvc |