Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

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: Magnus Hagander <mha(at)sollentuna(dot)net>, pgsql-hackers(at)postgresql(dot)org, Merlin Moncure <merlin(dot)moncure(at)rcsonline(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>
  • Subject: Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance
  • Date: Sun, 23 Oct 2005 16:22:26 -0400 (EDT)
  • Message-id: <Pine(dot)LNX(dot)4(dot)58(dot)0510231610370(dot)17114(at)josh(dot)db>


On Sun, 23 Oct 2005, Tom Lane wrote:

> "Magnus Hagander" <mha(at)sollentuna(dot)net> writes:
>
> In the spirit of incremental improvement ... I've taken Magnus' version
> and added the proposed change to re-enable Qingqing's patch by skipping
> WaitForSingleObjectEx altogether in the CHECK_FOR_INTERRUPTS code path.
> I also removed WaitForSingleObjectEx in pgwin32_poll_signals(), which
> AFAICS should be just like CHECK_FOR_INTERRUPTS.  I think this is what
> we are proposing to actually apply to 8.1beta4.  I can't test it though,
> so please check it over...
>
Questions:

Are we asserting that

	UNBLOCKED_SIGNAL_QUEUE() != 0
	then
	WaitForSingleObjectEx(0)==WAIT_OBJECT_0

If so, we can put this assertion in. Seems there is some race. In
pg_queue_signal(), we do it like this:

enter_critical_section();
mask the signal;
leave_critical_section();
SetEvent();

That is, we may detect the value first before we got event. So at least
the above assertion is not correct. This may cause other problems, just
for a quick feedback.

Regards,
Qingqing




Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group