Re: [PATCH 1/1] Initial mach based shared memory support.

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: James Hilliard <james(dot)hilliard1(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH 1/1] Initial mach based shared memory support.
Date: 2021-01-21 02:47:06
Message-ID: CA+hUKGKao=hLBqn7udCPo721NUSUP8ETLtzG+vWct9KJRETMAQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Nov 22, 2020 at 9:19 PM James Hilliard
<james(dot)hilliard1(at)gmail(dot)com> wrote:
> In order to avoid hitting these limits we can bypass the wrapper layer
> and just use mach directly.

FWIW I looked into using mach_vm_alllocate() years ago because I
wanted to be able to use its VM_FLAGS_SUPERPAGE_SIZE_2MB flag to
implement PostgreSQL's huge_pages option for the main shared memory
area, but I ran into some difficulty getting such mapping to be
inherited by fork() children. There may be some way to get past that,
but it seems the current crop of Apple Silicon has only 4KB and 16KB
pages and I don't know if that's interesting enough. On the other
hand, I just saw a claim that "running an arm64 Debian VM on Apple M1,
using a 16K page size instead of 4K reduces this kernel build time by
*16%*".

[1] https://twitter.com/AtTheHackOfDawn/status/1333895115174187011

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Zhihong Yu 2021-01-21 02:52:00 Re: Parallel INSERT (INTO ... SELECT ...)
Previous Message Tomas Vondra 2021-01-21 02:36:31 Re: POC: postgres_fdw insert batching