Date: Fri, 16 Sep 2016 13:17:14 +0300 From: Slawa Olhovchenkov <slw@zxy.spb.ru> To: Konstantin Belousov <kostikbel@gmail.com> Cc: John Baldwin <jhb@freebsd.org>, freebsd-stable@freebsd.org Subject: Re: nginx and FreeBSD11 Message-ID: <20160916101713.GA2840@zxy.spb.ru> In-Reply-To: <20160916091617.GT38409@kib.kiev.ua> References: <20160907191348.GD22212@zxy.spb.ru> <1823460.vTm8IvUQsF@ralph.baldwin.cx> <20160915174948.GW2840@zxy.spb.ru> <15357564.UUkYdbUZHc@ralph.baldwin.cx> <20160916091617.GT38409@kib.kiev.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Sep 16, 2016 at 12:16:17PM +0300, Konstantin Belousov wrote: > > vmspace_switch_aio() allows context switching with old curpmap > and new proc->p_vmspace. This is a weird condition, where > curproc->p_vmspace->vm_pmap is not equal to curcpu->pc_curpmap. I do > not see an obvious place which would immediately break, e.g. even > for context switch between assignment of newvm to p_vmspace and > pmap_activate(), the context-switch call to pmap_activate_sw() seems to > do right thing. > > Still, just in case, try this > > diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c > index a23468e..fbaa6c1 100644 > --- a/sys/vm/vm_map.c > +++ b/sys/vm/vm_map.c > @@ -481,6 +481,7 @@ vmspace_switch_aio(struct vmspace *newvm) > if (oldvm == newvm) > return; > > + critical_enter(); > /* > * Point to the new address space and refer to it. > */ > @@ -489,6 +490,7 @@ vmspace_switch_aio(struct vmspace *newvm) > > /* Activate the new mapping. */ > pmap_activate(curthread); > + critical_exit(); > > /* Remove the daemon's reference to the old address space. */ > KASSERT(oldvm->vm_refcnt > 1, OK, nginx core dumped, kernel don't crushed. Now I am try this patch (critical_enter) and reboot. PS: vi regresion: can't exit from vi when no space on /tmp
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20160916101713.GA2840>