Re: [HACKERS] O(1) DSM handle operations

2017-03-28 Thread Robert Haas
On Mon, Mar 27, 2017 at 11:47 PM, Thomas Munro wrote: > Couldn't cleanup code continue to work just the same way though? The > only extra structure is an intrusive freelist, but that could be > completely ignored by code that wants to scan the whole array after >

Re: [HACKERS] O(1) DSM handle operations

2017-03-27 Thread Thomas Munro
On Tue, Mar 28, 2017 at 3:52 PM, Robert Haas wrote: > On Mon, Mar 27, 2017 at 5:13 PM, Thomas Munro > wrote: >> This is just a thought for discussion, no patch attached... >> >> DSM operations dsm_create(), dsm_attach(), dsm_unpin_segment()

Re: [HACKERS] O(1) DSM handle operations

2017-03-27 Thread Robert Haas
On Mon, Mar 27, 2017 at 5:13 PM, Thomas Munro wrote: > This is just a thought for discussion, no patch attached... > > DSM operations dsm_create(), dsm_attach(), dsm_unpin_segment() perform > linear searches of the dsm_control->item array for either a free slot > or

[HACKERS] O(1) DSM handle operations

2017-03-27 Thread Thomas Munro
Hi hackers, This is just a thought for discussion, no patch attached... DSM operations dsm_create(), dsm_attach(), dsm_unpin_segment() perform linear searches of the dsm_control->item array for either a free slot or a slot matching a given handle. Maybe no one thinks this is a problem, because