Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance - Mailing list pgsql-hackers

From Qingqing Zhou
Subject Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance
Date
Msg-id Pine.LNX.4.58.0510242245220.30536@eon.cs
Whole thread Raw
In response to Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance
List 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.





pgsql-hackers by date:

Previous
From: Bruno Wolff III
Date:
Subject: Re: PG Killed by OOM Condition
Next
From: Tom Lane
Date:
Subject: Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance