pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Petr Jelinek <petr.jelinek@2ndquadrant.com>
Cc: Petr Jelinek <petr@2ndquadrant.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: John Gorman <johngorman2@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: PATCH: two slab-like memory allocators
Date: Thu, 2 Mar 2017 22:51:09 +0100
Message-ID: <fa4b397e-b454-d109-990f-2f05f7e47f15@2ndquadrant.com> (raw)
In-Reply-To: <20170301042936.usv23f4iaumeyptf@alap3.anarazel.de>
References: <12622.1488216468@sss.pgh.pa.us>
	<20170227174201.yrofai7neyp6shb2@alap3.anarazel.de>
	<c7c1bb85-d1d0-05a5-4d4c-3047d6f053e7@2ndquadrant.com>
	<20170228034232.4h7ouyhxq4lbbao2@alap3.anarazel.de>
	<1240.1488254244@sss.pgh.pa.us>
	<20170228051630.3qcevakcaaa6b4ef@alap3.anarazel.de>
	<1671.1488259784@sss.pgh.pa.us>
	<20170228074420.aazv4iw6k562mnxg@alap3.anarazel.de>
	<20170228184122.extbigaer5ryrt3z@alap3.anarazel.de>
	<20170301041835.wli3viwnxr5wonfv@alap3.anarazel.de>
	<20170301042936.usv23f4iaumeyptf@alap3.anarazel.de>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On 03/01/2017 05:29 AM, Andres Freund wrote:
> On 2017-02-28 20:18:35 -0800, Andres Freund wrote:
>> - Andres, hoping the buildfarm turns greener
>
> Oh well, that didn't work. Investigating.
>

Attaches is the last part of the patch series, rebased to current master 
and adopting the new chunk header approach. Unlike Slab, this context 
needs the whole AllocSet header (size, requested_size), and also the 
block pointer, so no padding seems to be needed.

I've tested this on x86-64 and amrv7l, and the test_decoding test suite 
passes on both.

FWIW, I'm still not entirely happy with the name "Generation". I agree 
with Andres that it's perhaps a bit too generic, but more importantly 
the name might actually be a bit obsolete. There used to be generations 
of chunks, but that's gone. Now it simply does not reuse the chunks at 
all, and frees the blocks when they get empty.

It's not entirely FIFO though, because the transactions interleave, so 
later blocks may be released first. But the "allocated close, freed 
close" is still there. So perhaps something like "TemporalSet" or 
something like that would be a better name?

Man, naming things is hard ...


regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

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

Attachments:

  [binary/octet-stream] gen-context.patch (0B, ../fa4b397e-b454-d109-990f-2f05f7e47f15@2ndquadrant.com/2-gen-context.patch)
  download

view thread (97+ messages)  latest in thread

Message-ID: <fa4b397e-b454-d109-990f-2f05f7e47f15@2ndquadrant.com>
Permalink:  ../fa4b397e-b454-d109-990f-2f05f7e47f15@2ndquadrant.com/
Also on:    postgresql.org/message-id/fa4b397e-b454-d109-990f-2f05f7e47f15@2ndquadrant.com

 ·  · 

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: tomas.vondra@2ndquadrant.com, andres@anarazel.de, tgl@sss.pgh.pa.us, petr.jelinek@2ndquadrant.com, petr@2ndquadrant.com, robertmhaas@gmail.com, johngorman2@gmail.com
  Subject: Re: PATCH: two slab-like memory allocators
  In-Reply-To: <fa4b397e-b454-d109-990f-2f05f7e47f15@2ndquadrant.com>

* 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