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_init
> >     `-> uvm_km_valloc
> >         `-> uvm_km_valloc_align
> >             `-> uvm_map
> >                 `-> vm_map_lock <-- sleeping lock
> > 
> > Debugger(10,d73eeeac,d03e0ee2,d06ab9a0,0) at Debugger+0x4
> > panic(d020319c,d73eeecc,d03ad948,d06ab980,d51c8000) at panic+0x61
> > mtx_enter(d06ab980,d51c8000,d51d8000,d02f70c5,10000) at mtx_enter+0x5c
> > uvm_pseg_release(d51c8000,10,d73eeefc,d02f41d4,50) at uvm_pseg_release+0x64
> > uvm_aio_aiodone(d0f422e4,0,d11c1c3c,d73eef90,d02e763d) at 
> > uvm_aio_aiodone+0xba
> > uvm_aiodone_daemon(d11c1c3c) at uvm_aiodone_daemon+0x97
> > Bad frame pointer: 0xd079ceb8
> > 
> > OpenBSD 4.6.
> > 
> > Or am I missing something?
> 
> No, I think you're right.  I think uvm_pseg_init() should use a memory
> allocation function that can't sleep.
> 
> I think I brought this up before questioning whether uvm_km_valloc()
> was allowed to sleep (since we also have uvm_km_valloc_wait()).  To
> that question art@ answered that uvm_km_valloc() still was allowed to
> sleep.

Yes, correct.

valloc_wait is special and only used for the limited maps (phys and exec
iirc).

uvm_km_valloc_try or something would be trivial to write which is a
valloc that only does a trylock on the map.

-0-
-- 
In order to make an apple pie from scratch, you must first create the
universe.
                -- Carl Sagan, Cosmos

Reply via email to