[prev in list] [next in list] [prev in thread] [next in thread]
List: openbsd-tech
Subject: Re: Prevent off-by-one accounting hang in out-of-swap situations
From: Martin Pieuchot <mpi () openbsd ! org>
Date: 2023-10-26 13:51:12
Message-ID: ZTpu0O-9ysIA-xc1 () oliva ! grenadille ! net
[Download RAW message or body]
On 26/10/23(Thu) 07:06, Miod Vallat wrote:
> > I wonder if the diff below makes a difference. It's hard to debug and it
> > might be worth adding a counter for bad swap slots.
>
> It did not help (but your diff is probably correct).
In that case I'd like to put both diffs in, are you ok with that?
> > Index: uvm/uvm_anon.c
> > ===================================================================
> > RCS file: /cvs/src/sys/uvm/uvm_anon.c,v
> > retrieving revision 1.56
> > diff -u -p -r1.56 uvm_anon.c
> > --- uvm/uvm_anon.c 2 Sep 2023 08:24:40 -0000 1.56
> > +++ uvm/uvm_anon.c 22 Oct 2023 21:27:42 -0000
> > @@ -116,7 +116,7 @@ uvm_anfree_list(struct vm_anon *anon, st
> > uvm_unlock_pageq(); /* free the daemon */
> > }
> > } else {
> > - if (anon->an_swslot != 0) {
> > + if (anon->an_swslot != 0 && anon->an_swslot != SWSLOT_BAD) {
> > /* This page is no longer only in swap. */
> > KASSERT(uvmexp.swpgonly > 0);
> > atomic_dec_int(&uvmexp.swpgonly);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic