Re: [PATCHES] update i386 spinlock for hyperthreading - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCHES] update i386 spinlock for hyperthreading
Date
Msg-id 23806.1072804575@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PATCHES] update i386 spinlock for hyperthreading  (Manfred Spraul <manfred@colorfullife.com>)
Responses Re: [PATCHES] update i386 spinlock for hyperthreading  (Jan Wieck <JanWieck@Yahoo.com>)
List pgsql-hackers
Manfred Spraul <manfred@colorfullife.com> writes:
> Are there strategies that do not rely on a global lock? The Linux kernel 
> uses a lazy LRU with referenced bits: on access, the referenced bit is 
> set. The freespace logic takes pages from the end of a linked list, and 
> checks that bit: if it's set, then the page is moved back to the top of 
> the list. Otherwise it's a candidate for replacement.

I think this is the same idea as what I was just suggesting: add an
extra check when looking for a free page, and thereby avoid having to
lock/update the global datastructure during ReadBuffer.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCHES] update i386 spinlock for hyperthreading
Next
From: Tom Lane
Date:
Subject: Re: Objects in schemas question