Re: [PATCHES] Change BgWriterCommLock to spinlock

2006-01-08 Thread Qingqing Zhou
On Sun, 8 Jan 2006, Tom Lane wrote: > > I don't see any problem here that urgently needs solving. If we ever > see any reports of out-of-memory failures in the bgwriter, then it'll > be time to worry about this, but I think it quite unlikely that we > ever will. (Even if we do, a simpler answer

Re: [PATCHES] Change BgWriterCommLock to spinlock

2006-01-08 Thread Tom Lane
Qingqing Zhou <[EMAIL PROTECTED]> writes: > Do you suggest it makes sense that we continue to work on the patch or let > it be? I don't see any problem here that urgently needs solving. If we ever see any reports of out-of-memory failures in the bgwriter, then it'll be time to worry about this, b

Re: [PATCHES] Change BgWriterCommLock to spinlock

2006-01-08 Thread Qingqing Zhou
On Sun, 8 Jan 2006, Tom Lane wrote: > > If you want the bgwriter to keep working in the face of an out-of-memory > condition in the hashtable, I think you'd have to change the coding so > that it takes requests one at a time from the queue. > Patched version will issue ERROR instead of PANIC at t

Re: [PATCHES] Change BgWriterCommLock to spinlock

2006-01-08 Thread Tom Lane
Qingqing Zhou <[EMAIL PROTECTED]> writes: > Yeah, only theoretically there is some marginal performance improvements. > Maybe you suggest we keep the LWLock but use the circular array part? They're separable issues anyway. > Yeah, not related to lock. But I changed algorithm to circular array as

Re: [PATCHES] Change BgWriterCommLock to spinlock

2006-01-08 Thread Qingqing Zhou
On Sun, 8 Jan 2006, Tom Lane wrote: > > > (1) The spinlock itself are light weight than the LWLock here and we > > can reduce the lock contention a little bit in AbsorbFsyncRequests(); > > Spinlock-based coding is inherently much more fragile than LWLock-based > coding. I'm against changing thin

Re: [PATCHES] Change BgWriterCommLock to spinlock

2006-01-08 Thread Tom Lane
Qingqing Zhou <[EMAIL PROTECTED]> writes: > On Sun, 8 Jan 2006, Tom Lane wrote: >> Why is this a good idea? > "In spirit of incremental improvement": > (1) The spinlock itself are light weight than the LWLock here and we can > reduce the lock contention a little bit in AbsorbFsyncRequests(); Spin

Re: [PATCHES] Change BgWriterCommLock to spinlock

2006-01-08 Thread Qingqing Zhou
On Sun, 8 Jan 2006, Tom Lane wrote: > > Why is this a good idea? > "In spirit of incremental improvement": (1) The spinlock itself are light weight than the LWLock here and we can reduce the lock contention a little bit in AbsorbFsyncRequests(); (2) Don't need the CRITICAL SECTION in AbsorbFsync

Re: [PATCHES] Change BgWriterCommLock to spinlock

2006-01-08 Thread Tom Lane
Qingqing Zhou <[EMAIL PROTECTED]> writes: > The following patch changes BgWriterCommLock to a spinlock. Why is this a good idea? regards, tom lane ---(end of broadcast)--- TIP 4: Have you searched our list archives?