Re: uvm_pseg_get uvm_pseg_lck fix

2010-02-08 Thread Owain Ainsworth
On Mon, Feb 01, 2010 at 11:30:06PM -0500, Ted Unangst wrote: I think this fixes the problem with sleeping and holding pseg_lck. Index: uvm_extern.h === RCS file: /home/tedu/cvs/src/sys/uvm/uvm_extern.h,v retrieving revision

Re: uvm_pseg_get uvm_pseg_lck fix

2010-02-08 Thread Ted Unangst
On Mon, Feb 8, 2010 at 11:11 AM, Owain Ainsworth zer...@googlemail.com wrote: On Mon, Feb 01, 2010 at 11:30:06PM -0500, Ted Unangst wrote: I think this fixes the problem with sleeping and holding pseg_lck. This won't build on sparc64 (the only caller of valloc_align). If you fix that, then I

Re: uvm_pseg_get uvm_pseg_lck fix

2010-02-03 Thread Ted Unangst
On Wed, Feb 3, 2010 at 9:41 AM, Owain Ainsworth zer...@googlemail.com wrote: Index: uvm_pager.c === RCS file: /home/tedu/cvs/src/sys/uvm/uvm_pager.c,v retrieving revision 1.54 diff -u -r1.54 uvm_pager.c --- uvm_pager.c 22

Re: uvm_pseg_get uvm_pseg_lck fix

2010-02-03 Thread Mark Kettenis
Date: Wed, 3 Feb 2010 14:41:04 + From: Owain Ainsworth zer...@googlemail.com On Mon, Feb 01, 2010 at 11:30:06PM -0500, Ted Unangst wrote: I think this fixes the problem with sleeping and holding pseg_lck. Index: uvm_extern.h

Re: uvm_pseg_get uvm_pseg_lck fix

2010-02-03 Thread Mark Kettenis
Date: Wed, 3 Feb 2010 06:10:09 +0100 From: Ariane van der Steldt ari...@stack.nl I think it'll only fix the problem partially though: uvm_km_free* doesn't have a trylock variant and may sleep just as well on the lock. That's fairly easy to fix though. You can simply save pseg-start in a

Re: uvm_pseg_get uvm_pseg_lck fix

2010-02-03 Thread Owain Ainsworth
On Wed, Feb 03, 2010 at 04:08:39PM +0100, Mark Kettenis wrote: Date: Wed, 3 Feb 2010 14:41:04 + From: Owain Ainsworth zer...@googlemail.com On Mon, Feb 01, 2010 at 11:30:06PM -0500, Ted Unangst wrote: I think this fixes the problem with sleeping and holding pseg_lck. Index:

Re: uvm_pseg_get uvm_pseg_lck fix

2010-02-02 Thread Mike Belopuhov
On Tue, Feb 02, 2010 at 15:21 +0300, Mike Belopuhov wrote: On Mon, Feb 01, 2010 at 23:30 -0500, Ted Unangst wrote: I think this fixes the problem with sleeping and holding pseg_lck. perhaps it also makes sense to honour UVMPAGER_MAPIN_WAITOK flag. what do you think? no, i'm sorry,

Re: uvm_pseg_get uvm_pseg_lck fix

2010-02-02 Thread Mike Belopuhov
On Mon, Feb 01, 2010 at 23:30 -0500, Ted Unangst wrote: I think this fixes the problem with sleeping and holding pseg_lck. perhaps it also makes sense to honour UVMPAGER_MAPIN_WAITOK flag. what do you think? Index: uvm_extern.h

Re: uvm_pseg_get uvm_pseg_lck fix

2010-02-02 Thread Ariane van der Steldt
On Mon, Feb 01, 2010 at 11:30:06PM -0500, Ted Unangst wrote: I think this fixes the problem with sleeping and holding pseg_lck. Index: uvm_extern.h === RCS file: /home/tedu/cvs/src/sys/uvm/uvm_extern.h,v retrieving revision

Re: uvm_pseg_get uvm_pseg_lck

2010-01-31 Thread Mark Kettenis
Date: Thu, 28 Jan 2010 18:55:55 +0300 From: Mike Belopuhov m...@crypt.org.ru Hi all, could someone please enlighten me how this uvm_pseg_get is supposed to work? uvm_pseg_get mtx_enter(uvm_pseg_lck); `- uvm_pseg_init `- uvm_km_valloc `- uvm_km_valloc_align

Re: uvm_pseg_get uvm_pseg_lck

2010-01-31 Thread Owain Ainsworth
On Sun, Jan 31, 2010 at 02:05:35PM +0100, Mark Kettenis wrote: Date: Thu, 28 Jan 2010 18:55:55 +0300 From: Mike Belopuhov m...@crypt.org.ru Hi all, could someone please enlighten me how this uvm_pseg_get is supposed to work? uvm_pseg_get mtx_enter(uvm_pseg_lck); `-

uvm_pseg_get uvm_pseg_lck

2010-01-28 Thread Mike Belopuhov
Hi all, could someone please enlighten me how this uvm_pseg_get is supposed to work? uvm_pseg_get mtx_enter(uvm_pseg_lck); `- uvm_pseg_init `- uvm_km_valloc `- uvm_km_valloc_align `- uvm_map `- vm_map_lock -- sleeping lock

Re: uvm_pseg_get uvm_pseg_lck

2010-01-28 Thread Ariane van der Steldt
On Thu, Jan 28, 2010 at 06:55:55PM +0300, Mike Belopuhov wrote: could someone please enlighten me how this uvm_pseg_get is supposed to work? uvm_pseg_get mtx_enter(uvm_pseg_lck); `- uvm_pseg_init `- uvm_km_valloc `- uvm_km_valloc_align `- uvm_map