Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cjYef-0004tR-Fi for pgsql-hackers@arkaria.postgresql.org; Thu, 02 Mar 2017 21:52:57 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cjYef-0006L1-2a for pgsql-hackers@arkaria.postgresql.org; Thu, 02 Mar 2017 21:52:57 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cjYd9-0002O2-9W for pgsql-hackers@postgresql.org; Thu, 02 Mar 2017 21:51:23 +0000 Received: from mail-wm0-x22d.google.com ([2a00:1450:400c:c09::22d]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cjYd6-0007og-5L for pgsql-hackers@postgresql.org; Thu, 02 Mar 2017 21:51:22 +0000 Received: by mail-wm0-x22d.google.com with SMTP id v186so2153311wmd.0 for ; Thu, 02 Mar 2017 13:51:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to; bh=iEdnsW5s4AFyEVYuUOcsgn0S4mhd07d4TrMSS8TeDl4=; b=KJUhX/5l6ZKMjz7is8TtDrDR7Mj1YutrT9vSilA+G9+Fz/eJKL2OJmFMT+R/UbUes+ p+4JOPRSTYAjfdcJVJP7X6p/cUg0gKTL7Lty0DnNZxEPbViO0UsXbalEd9rEqbdHz3TC A8VZS82R+Mm+jVeH7qMhvTTjN0PwmlzmIs+GHV7DCFAPspF/DqJOOV7B2NW5FK8EIMri 4vC5xinYwwqfziwgt58UtmWV1KwiizDdccKDgX0iIF9YdkUVxcfaSuBp0SIXu6IyfZXI K541meQTNNCPVQmp8Q6WACsD1Eu5mSZXPEJTmRn6P6bKqvcDs3SFBhWt+1OnwY1dMD1o 8w+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to; bh=iEdnsW5s4AFyEVYuUOcsgn0S4mhd07d4TrMSS8TeDl4=; b=OVu0+bHiYc62UuH4HOYttSObHCbIo6FaCP15/XMiWfiJrOPXnWKe0kkx7e46AuBkFw aqfw47nUetifwRAKmDuJqNkB04uAgBJ3eB+rlLZN0K7efejUWZ4fAQVONEkHaAnlFDOI TNPT4rR3BY8oCNQJQWdeoWnnch+Kk/JHo8KFzAdW8VIddAZRfd50ZyQmSha8a1PXEvz/ lXt/1jAg6k9fzEb3HSOtNww7pY0IXsLbUS76on0fjkraWEGqBxgXhlpaWTbYDubeRipx wUYRTYOTZ/Y0s+Gv/qLXW620feE+v5HM2CVrygC1Jp+OcsI1qirz0f5BdviaV7Gt+AOk TuGA== X-Gm-Message-State: AMke39kcPEpuyy+gAFz5VM75V0k5hZT3DnNxsTjWeHAbIQ1gyJ+rzwmg15Tu/Ls/rOeTybSXPpxeu1Uha8OV0CbO9EmIwOfsLf7pcK4Kd87mbNF5EN6SrMgo87/ZQgJtiQvWoxTglorMRn38hdm2289hFNrImnYjduSDpU6tX/6iek+ATluOWcE4MtWIJYG5Qa3bd1oJHsR3 X-Received: by 10.28.226.215 with SMTP id z206mr304930wmg.92.1488491478995; Thu, 02 Mar 2017 13:51:18 -0800 (PST) Received: from [10.137.2.17] (ip-89-177-46-65.net.upcbroadband.cz. [89.177.46.65]) by smtp.gmail.com with ESMTPSA id x193sm297348wme.23.2017.03.02.13.51.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Mar 2017 13:51:18 -0800 (PST) Subject: Re: PATCH: two slab-like memory allocators To: Andres Freund , Tom Lane References: <12622.1488216468@sss.pgh.pa.us> <20170227174201.yrofai7neyp6shb2@alap3.anarazel.de> <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> Cc: Petr Jelinek , Petr Jelinek , Robert Haas , John Gorman , pgsql-hackers From: Tomas Vondra Message-ID: Date: Thu, 2 Mar 2017 22:51:09 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20170301042936.usv23f4iaumeyptf@alap3.anarazel.de> Content-Type: multipart/mixed; boundary="------------BFD53F89E8551B41365F2999" X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org This is a multi-part message in MIME format. --------------BFD53F89E8551B41365F2999 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit 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 --------------BFD53F89E8551B41365F2999 Content-Type: binary/octet-stream; name="gen-context.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="gen-context.patch" --------------BFD53F89E8551B41365F2999 Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers --------------BFD53F89E8551B41365F2999--