Re: [HACKERS] spin locks

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: scrappy(at)hub(dot)org (The Hermit Hacker)
Cc: dz(at)cs(dot)unitn(dot)it, hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] spin locks
Date: 1998-03-16 05:08:03
Message-ID: 199803160508.AAA22455@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
> On Sun, 15 Feb 1998, Bruce Momjian wrote:
>
> > > I'm not quite sure I follow this...in a multi-cpu environment,
> > > would process_yield() introduce a problem? *raised eyebrow*
> >
> > Probably. I would leave the code as-is for multi-cpu systems.
>
> So...how would we determine which is which? *raised eyebrow*
>
> > Yep, but we need to check for multiple cpu's first before enabling it.
> > That would be a good trick from configure.
>
> I'm curious, still, as to whether this function would help
> performance on a multi-cpu environment as well...what if 2 processes are
> running on one of two CPUs, and another 2 on the other? *raised eyebrow*

Good point. You would almost need to know if the one holding the lock
was currently running. But it wouldn't be un-runnable while it was
holding the spinlock, so it should be run-able, even if it is not
currently running.

--
Bruce Momjian | 830 Blythe Avenue
maillist(at)candle(dot)pha(dot)pa(dot)us | Drexel Hill, Pennsylvania 19026
+ If your life is a hard drive, | (610) 353-9879(w)
+ Christ can be your backup. | (610) 853-3000(h)

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1998-03-16 05:09:01 Re: [HACKERS] Re: [BUGS] General Bug Report: palloc fails with lots of ANDs and ORs
Previous Message Bruce Momjian 1998-03-16 04:59:32 Re: [HACKERS] Some cleanups/enhancements