Unix Technical Forum

Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance tweak

This is a discussion on Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance tweak within the pgsql Hackers forums, part of the PostgreSQL category; --> > > Shall we add "volatile" quanlifier to at least pg_signal_queue? > > If that's changed by a separate ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Hackers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-11-2008, 07:21 AM
Magnus Hagander
 
Posts: n/a
Default Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance tweak

> > Shall we add "volatile" quanlifier to at least pg_signal_queue?
>
> If that's changed by a separate thread, "volatile" seems essential.
> What about the mask variable?


Yes, that does seem right. Previously it would never be concurrently
modified, because it was always locked by the critical section, but now
we read it without locking, and we certainly don't want that optimized
away.

The mask is only ever written by the main thread, never by the signal
dispatching thread. So I think that one could do without.

//Magnus

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-11-2008, 07:21 AM
Qingqing Zhou
 
Posts: n/a
Default Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance tweak



On Fri, 21 Oct 2005, Magnus Hagander wrote:

> > > Shall we add "volatile" quanlifier to at least pg_signal_queue?

> >
> > If that's changed by a separate thread, "volatile" seems essential.
> > What about the mask variable?

>
> Yes, that does seem right. Previously it would never be concurrently
> modified, because it was always locked by the critical section, but now
> we read it without locking, and we certainly don't want that optimized
> away.
>
> The mask is only ever written by the main thread, never by the signal
> dispatching thread. So I think that one could do without.
>


Agreed.

Regards,
Qingqing
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 11:40 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com