_mtx_lock_spin: obsolete historic handling of kdb_active and panicstr?

2012-10-17 Thread Andriy Gapon
_mtx_lock_spin has the following check in its retry loop: if (i < 6000 || kdb_active || panicstr != NULL) DELAY(1); else _mtx_lock_spin_failed(m); Which means that in the (!kdb_active && panicstr == NULL) case we will make at most 6000 iterations and then call _mtx_lock_sp

Re: _mtx_lock_spin: obsolete historic handling of kdb_active and panicstr?

2012-10-17 Thread mdf
On Wed, Oct 17, 2012 at 4:20 AM, Andriy Gapon wrote: > > _mtx_lock_spin has the following check in its retry loop: > if (i < 6000 || kdb_active || panicstr != NULL) > DELAY(1); > else > _mtx_lock_spin_failed(m); > [snip analysis] > > So I'd like to propose to remove those check

Re: _mtx_lock_spin: obsolete historic handling of kdb_active and panicstr?

2012-10-17 Thread Andriy Gapon
on 17/10/2012 15:07 m...@freebsd.org said the following: > On Wed, Oct 17, 2012 at 4:20 AM, Andriy Gapon wrote: >> >> _mtx_lock_spin has the following check in its retry loop: >> if (i < 6000 || kdb_active || panicstr != NULL) >> DELAY(1); >> else >> _mtx_lock_spin_failed(m); >

Re: _mtx_lock_spin: obsolete historic handling of kdb_active and panicstr?

2012-10-17 Thread John Baldwin
On Wednesday, October 17, 2012 7:20:56 am Andriy Gapon wrote: > > _mtx_lock_spin has the following check in its retry loop: > if (i < 6000 || kdb_active || panicstr != NULL) > DELAY(1); > else > _mtx_lock_spin_failed(m); > > Which means that in the (!kdb_active && panicstr ==

syncing large mmaped files

2012-10-17 Thread Tristan Verniquet
I want to work with large (1-10G) files in memory but eventually sync them back out to disk. The problem is that the sync process appears to lock the file in kernel for the duration of the sync, which can run into minutes. This prevents other processes from reading from the file (unless they al