Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance

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

On Mon, 24 Oct 2005, Tom Lane wrote:

>
> Are we all comfortable that
> http://archives.postgresql.org/pgsql-hackers/2005-10/msg01009.php
> is OK to apply?
>
> regards, tom lane

I tried to persuade myself that removing all WaitForSingleObjectEx() is
safe ... the thing is we will false alarm EINTR as Magnus said (details to
repeat it are list below in case). There are several EINTR in the code,
semop() calls, socket() calls, ..., seems they are all ok except
pgwin32_backend_usleep() changes a little bit performance: it can't sleep
enough because of the false alarm, but it is ok though.

Conclusion: Agree to apply.

Regards,
Qingqing

---
Consider a sequence like this:

1. I am killing you signal A:

enter_crit;
set signal bit;
leave_crit;

2. You CHECK_FOR_INTERRUPTS():
enter_crit;
sig(A);
ResetEvent();
leave_crit;

3. I finish my killing:
SetEvent();

Now the event is signaled but the signal is handled already.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-10-25 03:21:52 Re: BUG #1993: Adding/subtracting negative time intervals
Previous Message Bruno Wolff III 2005-10-25 03:20:39 Re: PG Killed by OOM Condition