Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance

Поиск
Список
Период
Сортировка
От Qingqing Zhou
Тема Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance
Дата
Msg-id Pine.LNX.4.58.0510231610370.17114@josh.db
обсуждение исходный текст
Ответ на Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers

On Sun, 23 Oct 2005, Tom Lane wrote:

> "Magnus Hagander" <mha@sollentuna.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() != 0thenWaitForSingleObjectEx(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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Magnus Hagander"
Дата:
Сообщение: Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance
Следующее
От: Qingqing Zhou
Дата:
Сообщение: Re: [PATCHES] Win32 CHECK_FOR_INTERRUPTS() performance