Date: Thu, 2 Jan 2020 09:16:47 -0500 From: Mark Johnston <markj@freebsd.org> To: Idwer Vollering <vidwer@gmail.com> Cc: Michael Tuexen <tuexen@freebsd.org>, bob prohaska <fbsd@www.zefox.net>, freebsd-arm@freebsd.org, freebsd-current <freebsd-current@freebsd.org> Subject: Re: panic: vm_page_astate_fcmpset: invalid head requeue request on RPI3 Message-ID: <20200102141647.GB71506@raichu> In-Reply-To: <CAPp9OrkZ5UeaY32b%2BzzOXuf91UBEpRt-dMbVAH7_JWXG6gZ-7A@mail.gmail.com> References: <20200102001231.GA84583@www.zefox.net> <AE617FD7-3215-43FC-8D11-F1C4D1FC7B39@freebsd.org> <CAPp9OrkZ5UeaY32b%2BzzOXuf91UBEpRt-dMbVAH7_JWXG6gZ-7A@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jan 02, 2020 at 02:58:16PM +0100, Idwer Vollering wrote: > This can happen on amd64, on r356262, too. > > $ kgdb /boot/kernel/kernel vmcore.0 > GNU gdb (GDB) 8.3.1 [GDB v8.3.1 for FreeBSD] > Copyright (C) 2019 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. > Type "show copying" and "show warranty" for details. > This GDB was configured as "x86_64-portbld-freebsd13.0". > Type "show configuration" for configuration details. > For bug reporting instructions, please see: > <http://www.gnu.org/software/gdb/bugs/>. > Find the GDB manual and other documentation resources online at: > <http://www.gnu.org/software/gdb/documentation/>. > > For help, type "help". > Type "apropos word" to search for commands related to "word"... > Reading symbols from /boot/kernel/kernel... > Reading symbols from /usr/lib/debug//boot/kernel/kernel.debug... > > Unread portion of the kernel message buffer: > panic: vm_page_astate_fcmpset: invalid head requeue request for page Sorry for the breakage. I believe the patch below will fix the problem, I am testing it now. diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c index 1e74f5c4c6db..cbdab1374f72 100644 --- a/sys/vm/vm_pageout.c +++ b/sys/vm/vm_pageout.c @@ -834,6 +834,7 @@ vm_pageout_launder(struct vm_domain *vmd, int launder, bool in_shortfall) if (new.act_count > ACT_MAX) new.act_count = ACT_MAX; + new.flags &= ~PGA_QUEUE_OP_MASK; new.flags |= PGA_REQUEUE; new.queue = PQ_ACTIVE; if (!vm_page_pqstate_commit(m, &old, new)) @@ -1313,8 +1314,9 @@ vm_pageout_scan_active(struct vm_domain *vmd, int page_shortage) */ ps_delta = 0; if (old.queue != PQ_ACTIVE) { - old.queue = PQ_ACTIVE; - old.flags |= PGA_REQUEUE; + new.flags &= ~PGA_QUEUE_OP_MASK; + new.flags |= PGA_REQUEUE; + new.queue = PQ_ACTIVE; } } else { /* @@ -1350,6 +1352,7 @@ vm_pageout_scan_active(struct vm_domain *vmd, int page_shortage) ps_delta = 1; } + new.flags &= ~PGA_QUEUE_OP_MASK; new.flags |= PGA_REQUEUE; new.queue = nqueue; } @@ -1560,6 +1563,7 @@ vm_pageout_scan_inactive(struct vm_domain *vmd, int shortage, if (new.act_count > ACT_MAX) new.act_count = ACT_MAX; + new.flags &= ~PGA_QUEUE_OP_MASK; new.flags |= PGA_REQUEUE; new.queue = PQ_ACTIVE; if (!vm_page_pqstate_commit(m, &old, new))
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200102141647.GB71506>