Re: svn commit: r203696 - in head: lib/libc/sys sys/kern sys/sys

2010-02-11 Thread Kostik Belousov
On Wed, Feb 10, 2010 at 08:20:37PM -0800, Marcel Moolenaar wrote: > > On Feb 10, 2010, at 1:15 AM, Kostik Belousov wrote: > > > > Vnode locks are before vm map locks in global lock order. vn_fullpath() > > may need to lock vnodes to call VOP_VPTOCNP(). I think you should (and > > can) drop both v

Re: svn commit: r203696 - in head: lib/libc/sys sys/kern sys/sys

2010-02-10 Thread Marcel Moolenaar
On Feb 10, 2010, at 1:15 AM, Kostik Belousov wrote: > > Vnode locks are before vm map locks in global lock order. vn_fullpath() > may need to lock vnodes to call VOP_VPTOCNP(). I think you should (and > can) drop both vm map lock and vmspace reference much earlier. > > Would it be cleaner to use

Re: svn commit: r203696 - in head: lib/libc/sys sys/kern sys/sys

2010-02-10 Thread Kostik Belousov
On Tue, Feb 09, 2010 at 04:11:43PM -0800, Marcel Moolenaar wrote: > > On Feb 9, 2010, at 11:17 AM, Marcel Moolenaar wrote: > > > Action items: > > > - vmspace should be referenced by vmspace_acquire_ref() > - vm_map should be read-locked before iterating the map entries. > > > > I'll

Re: svn commit: r203696 - in head: lib/libc/sys sys/kern sys/sys

2010-02-09 Thread Marcel Moolenaar
On Feb 9, 2010, at 11:17 AM, Marcel Moolenaar wrote: > Action items: > - vmspace should be referenced by vmspace_acquire_ref() - vm_map should be read-locked before iterating the map entries. > > I'll implement it and send a patch for review to avoid unnecessary > repository churn...

Re: svn commit: r203696 - in head: lib/libc/sys sys/kern sys/sys

2010-02-09 Thread Marcel Moolenaar
On Feb 9, 2010, at 10:40 AM, Kostik Belousov wrote: *snip* Action items: >>> - vmspace should be referenced by vmspace_acquire_ref() >>> - vm_map should be read-locked before iterating the map entries. *snip* >> We can always put the timestamp in the structure. *snip* >> (2) the tracing pro

Re: svn commit: r203696 - in head: lib/libc/sys sys/kern sys/sys

2010-02-09 Thread Kostik Belousov
On Tue, Feb 09, 2010 at 09:30:51AM -0800, Marcel Moolenaar wrote: > > On Feb 9, 2010, at 1:57 AM, Kostik Belousov wrote: > >> + map = &p->p_vmspace->vm_map; > > I think this place lacks two safety measures: > > - vmspace should be referenced by vmspace_acquire_ref() > > - vm_map should be read-lo

Re: svn commit: r203696 - in head: lib/libc/sys sys/kern sys/sys

2010-02-09 Thread Marcel Moolenaar
On Feb 9, 2010, at 1:57 AM, Kostik Belousov wrote: >> +map = &p->p_vmspace->vm_map; > I think this place lacks two safety measures: > - vmspace should be referenced by vmspace_acquire_ref() > - vm_map should be read-locked before iterating the map entries. > Vmspace may be shared between stop

Re: svn commit: r203696 - in head: lib/libc/sys sys/kern sys/sys

2010-02-09 Thread Renato Botelho
On Tue, Feb 9, 2010 at 3:52 AM, Marcel Moolenaar wrote: > Author: marcel > Date: Tue Feb  9 05:52:35 2010 > New Revision: 203696 > URL: http://svn.freebsd.org/changeset/base/203696 > > Log: >  Add PT_VM_TIMESTAMP and PT_VM_ENTRY so that the tracing process can >  obtain the memory map of the trace

Re: svn commit: r203696 - in head: lib/libc/sys sys/kern sys/sys

2010-02-09 Thread Kostik Belousov
On Tue, Feb 09, 2010 at 05:52:35AM +, Marcel Moolenaar wrote: > Author: marcel > Date: Tue Feb 9 05:52:35 2010 > New Revision: 203696 > URL: http://svn.freebsd.org/changeset/base/203696 > > Log: > Add PT_VM_TIMESTAMP and PT_VM_ENTRY so that the tracing process can > obtain the memory map