pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Васильев Дмитрий <d.vasilyev@postgrespro.ru>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: Performance degradation in commit ac1d794
Date: Thu, 14 Jan 2016 18:22:16 +0100
Message-ID: <20160114172216.GL10941@awork2.anarazel.de> (raw)
In-Reply-To: <20160114171421.GK10941@awork2.anarazel.de>
References: <20151225211326.z4umuafvv27nczya@alap3.anarazel.de>
	<24833.1451078993@sss.pgh.pa.us>
	<20151226112248.uv3qxmroe4va7wke@alap3.anarazel.de>
	<20160114143931.GG10941@awork2.anarazel.de>
	<CA+Tgmoaay7n0HbqH4BS+XhdOOYhvYJ7DqZGrMXvduZM8UUXedQ@mail.gmail.com>
	<20160114155617.GI10941@awork2.anarazel.de>
	<CA+TgmoZ_2EgBCXinHsJn=v8bfg3Y3uXpG1xHiQ8g7yRJzwt3Yg@mail.gmail.com>
	<20160114170604.GJ10941@awork2.anarazel.de>
	<CA+TgmoanS+7wpYZeX1C5Vp1XL56XK7f3mx1T+94QDN0_a+y3Jw@mail.gmail.com>
	<20160114171421.GK10941@awork2.anarazel.de>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On 2016-01-14 18:14:21 +0100, Andres Freund wrote:
> I'm thinking of something like;
> 
> int WaitOnLatchSet(LatchEventSet *set, int wakeEvents, long timeout);
> 
> int
> WaitLatchOrSocket(volatile Latch *latch, int wakeEvents, pgsocket sock,long timeout)
> {
>         LatchEventSet set;
> 
>         LatchEventSetInit(&set, latch);
> 
>         if (sock != PGINVALID_SOCKET)
>            LatchEventSetAddSock(&set, sock);
> 
>         return WaitOnLatchSet(set, wakeEvents, timeout);
> }
> 
> I think we'll need to continue having wakeEvents and timeout parameters
> for WaitOnLatchSet, we quite frequently want to wait socket
> readability/writability, not wait on the socket, or have/not have
> timeouts.

This brings me to something related: I'm wondering if we shouldn't merge
unix/win32_latch.c. If we go this route it seems like the amount of
shared infrastructure will further increase. The difference between
win32 and, say, the select code isn't much bigger than the difference
between select/poll. epoll/win32 are probably more similar than that
actually.

Andres


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (93+ messages)  latest in thread

Message-ID: <20160114172216.GL10941@awork2.anarazel.de>
Permalink:  ../20160114172216.GL10941@awork2.anarazel.de/
Also on:    postgresql.org/message-id/20160114172216.GL10941@awork2.anarazel.de

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: andres@anarazel.de, robertmhaas@gmail.com, tgl@sss.pgh.pa.us, d.vasilyev@postgrespro.ru
  Subject: Re: Performance degradation in commit ac1d794
  In-Reply-To: <20160114172216.GL10941@awork2.anarazel.de>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox