From: | Manfred Spraul <manfred(at)colorfullife(dot)com> |
---|---|
To: | Jan Wieck <JanWieck(at)Yahoo(dot)com> |
Cc: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org, markw(at)osdl(dot)org |
Subject: | Re: [PATCHES] update i386 spinlock for hyperthreading |
Date: | 2003-12-30 17:10:39 |
Message-ID: | 3FF1B18F.5090408@colorfullife.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers pgsql-patches |
Jan Wieck wrote:
>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.
>
I feared that.
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. Pages start at the
head of that pseudo-lru list, with the reference bit clear: that way a
page that is accessed only once has a lower priority than a frequently
accessed page. At least that's how I understand the algorithm.
--
Manfred
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-12-30 17:12:10 | Re: [PATCHES] update i386 spinlock for hyperthreading |
Previous Message | John Sidney-Woollett | 2003-12-30 16:57:16 | Re: Is my MySQL Gaining ? |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-12-30 17:12:10 | Re: [PATCHES] update i386 spinlock for hyperthreading |
Previous Message | John Sidney-Woollett | 2003-12-30 16:57:16 | Re: Is my MySQL Gaining ? |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-12-30 17:12:10 | Re: [PATCHES] update i386 spinlock for hyperthreading |
Previous Message | Jan Wieck | 2003-12-30 16:55:43 | Re: [PATCHES] update i386 spinlock for hyperthreading |