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

From Jan Wieck
Subject Re: [PATCHES] update i386 spinlock for hyperthreading
Date
Msg-id 3FF199A5.1080709@Yahoo.com
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  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: [PATCHES] update i386 spinlock for hyperthreading  (Manfred Spraul <manfred@colorfullife.com>)
List pgsql-hackers
Manfred Spraul wrote:
> Bruce Momjian wrote:
> 
>>>Anyone see an attack path here?
>>>    
>>>
>>
>>Should we have one lock per hash bucket rather than one for the entire
>>hash?
>>  
>>
> That's the simple part. The problem is the aging strategy: we need a
> strategy that doesn't rely on a global list that's updated after every
> lookup. If I understand the ARC code correctly, there is a
> STRAT_MRU_INSERT(cdb, STRAT_LIST_T2) that happen in every lookup.

Moving the Cache Directory Block (cdb) on a hit to the MRU position of
the appropriate queue "is the bookkeeping" of this strategy. The whole
algorithm is based on it, and I don't see yet how to avoid that without
opening a huge can of worms that look like deadlocks. But I'll think
about it for a while.


Jan

-- 
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Concurrence GiST
Next
From: Tom Lane
Date:
Subject: Re: sticky sequence