Re: semtimedop instead of setitimer/semop/setitimer - Mailing list pgsql-hackers

From Tom Lane
Subject Re: semtimedop instead of setitimer/semop/setitimer
Date
Msg-id 11746.1064013783@sss.pgh.pa.us
Whole thread Raw
In response to semtimedop instead of setitimer/semop/setitimer  (Manfred Spraul <manfred@colorfullife.com>)
Responses Re: semtimedop instead of setitimer/semop/setitimer
List pgsql-hackers
Manfred Spraul <manfred@colorfullife.com> writes:
> I've noticed that postgres strace output contains long groups of 
> setitimer/semop/setitimer.
> Just FYI: semtimedop is a special syscalls that implements a semop with 
> a timeout. It was added just for the purpose of avoiding the setitimer 
> calls.
> I know that it's supported by Solaris and recent Linux versions, I'm not 
> sure about other operating systems.

I am ;-).  We could not rely on using it.

> Has anyone tried to use it?

It would require a fairly messy crossing of platform-dependent with
platform-independent code.  Can we see some proof that there's a useful
speedup possible before we think about this?

AFAIK, semops are not done unless we actually have to yield the
processor, so saving a syscall or two in that path doesn't sound like a
big win.  I'd be more interested in asking why you're seeing long series
of semops in the first place.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "scott.marlowe"
Date:
Subject: Re: PostgreSQL not ACID compliant?
Next
From: Tom Lane
Date:
Subject: Re: PostgreSQL not ACID compliant?