Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Magnus Hagander" <mha(at)sollentuna(dot)net>
Cc: "Andrew Dunstan" <andrew(at)dunslane(dot)net>, "Qingqing Zhou" <zhouqq(at)cs(dot)toronto(dot)edu>, pgsql-hackers(at)postgresql(dot)org, "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com>
Subject: Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance
Date: 2005-10-22 17:21:03
Message-ID: 2239.1130001663@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> Isn't there some way we can get the timer completion routine to be run
> by the signal thread instead? This coding seems pretty unreliable to me
> even without QQ's patch.

After further thought it seems like the right thing to do is to redesign
port/win32/timer.c so that it sets up a separate thread whose
responsibility is to wait for timeouts and deliver a SIGALRM signal back
to the main thread when they happen. It's probably a bit late to
consider doing this for 8.1 :-(

I've temporarily disabled Qingqing's patch by the expedient of removing
the UNBLOCKED_SIGNAL_QUEUE() check in the macro, so that the out-of-line
routine is always called (since we're going to do a kernel call anyway,
one extra layer of subroutine call doesn't seem very important). We can
put it back after fixing timer.c.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-10-22 17:38:43 Re: [Slony1-general] Slony1_funcs broken with 8.1
Previous Message Martijn van Oosterhout 2005-10-22 16:17:12 Re: Lifecycle management