Re: [HACKERS] Warm-cache prefetching

2005-12-08 Thread Min Xu (Hsu)
Perhaps because P4 is already doing H/W prefetching? http://www.tomshardware.com/2000/11/20/intel/page5.html I ran the test program on an opteron 2.2G: % ./a.out 10 16 Sum: -951304192: with prefetch on - duration: 81.166 ms Sum: -951304192: with prefetch off - duration: 79.769 ms Sum:

Re: [HACKERS] Spinlocks, yet again: analysis and proposed patches

2005-09-13 Thread Min Xu (Hsu)
On Tue, 13 Sep 2005 Tom Lane wrote : I wrote: We could ameliorate this if there were a way to acquire ownership of the cache line without necessarily winning the spinlock. Another thought came to mind: maybe the current data layout for LWLocks is bad. Right now, the spinlock that

Re: [HACKERS] Spinlocks, yet again: analysis and proposed patches

2005-09-13 Thread Min Xu (Hsu)
On Tue, 13 Sep 2005 Tom Lane wrote : Min Xu (Hsu) [EMAIL PROTECTED] writes: ...If this were the case, perhaps first fetch the spin lock with read-only permission should have helped. But the cmpb instruction in the 8.0 version of TAS would have done that, and I think we've already

Re: [HACKERS] Spinlocks, yet again: analysis and proposed patches

2005-09-13 Thread Min Xu (Hsu)
On Tue, 13 Sep 2005 Tom Lane wrote : Min Xu (Hsu) [EMAIL PROTECTED] writes: ... As you said, however, experimental results shows fetching read-only lines didn't help, which led me wonder whether the second scenario your described was really happening. I don't know --- we haven't tried

Re: [HACKERS] Concurrent free-lock

2005-01-24 Thread Min Xu (Hsu)
Neil and others, It might be interesting to look at some of the papers by Michael Scott et al. I am not an expert on non-blocking data structures, but the following page seems interesting: http://www.cs.rochester.edu/u/scott/synchronization/ esp. (7) nonblocking dual data structures, which

Re: [HACKERS] Concurrent free-lock

2005-01-24 Thread Min Xu (Hsu)
On Tue, 25 Jan 2005 Neil Conway wrote : Amazingly, there *are* lock-free hash table algorithms (e.g. [1]), but at first glance they seem pretty complex, and It is a little scary when I read the lock-free hash table algorithm needs a theorem prover to prove its correctness. I'd guess maintaining

Re: [HACKERS] We have got a serious problem with pg_clog/WAL synchronization

2004-08-11 Thread Min Xu (Hsu)
Tom Lane wrote: While investigating Satoshi Okada's bug report here ... What I am thinking of doing to fix the problem is to introduce a new LWLock that RecordTransactionCommit will take a shared lock on before writing its WAL record, and not release until it has updated pg_clog. Checkpoint

Re: [HACKERS] valgrind errors

2004-04-22 Thread Min Xu (Hsu)
I am also interested in this so I want to make some comments. On Thu, 22 Apr 2004 Shachar Shemesh wrote : Found it: http://developer.kde.org/~sewardj/docs-2.0.0/mc_main.html, section 3.3.2 It is important to understand that your program can copy around junk (uninitialised) data to its