Panic on boot with r351461 (AMD ThreadRipper 2990WX)
Mark Johnston
markj at freebsd.org
Sun Aug 25 16:55:38 UTC 2019
On Sun, Aug 25, 2019 at 10:27:48AM -0600, Rebecca Cran wrote:
> On 2019-08-25 08:30, Konstantin Belousov wrote:
> >
> > So what happens, IMO, is that for memory-less domains ds_cnt is zero
> > because ds_mask is zero, which causes the exception on divide. You
> > can try the following combined patch, but I really dislike the fact
> > that I cannot safely use DOMAINSET_FIXED (if my diagnosis is correct).
>
>
> With that patch applied, boot gets a lot further but eventually panics
> after probing pcm devices:
>
>
> panic: vm_domainset_iter_first: Unknown policy 0
Can you please try applying this patch as well?
diff --git a/sys/vm/uma.h b/sys/vm/uma.h
index be88c57a5c66..39749ac52e99 100644
--- a/sys/vm/uma.h
+++ b/sys/vm/uma.h
@@ -292,6 +292,8 @@ uma_zone_t uma_zcache_create(char *name, int size, uma_ctor ctor, uma_dtor dtor,
#define UMA_ALIGN_CACHE (0 - 1) /* Cache line size align */
#define UMA_ALIGNOF(type) (_Alignof(type) - 1) /* Alignment fit for 'type' */
+#define UMA_ANYDOMAIN -1 /* Special value for domain search. */
+
/*
* Destroys an empty uma zone. If the zone is not empty uma complains loudly.
*
diff --git a/sys/vm/uma_core.c b/sys/vm/uma_core.c
index 9d8752df7200..78eaa7b49f82 100644
--- a/sys/vm/uma_core.c
+++ b/sys/vm/uma_core.c
@@ -234,8 +234,6 @@ enum zfreeskip {
SKIP_FINI = 0x00020000,
};
-#define UMA_ANYDOMAIN -1 /* Special value for domain search. */
-
/* Prototypes.. */
int uma_startup_count(int);
diff --git a/sys/vm/vm_glue.c b/sys/vm/vm_glue.c
index ed26f9607a8f..4a7bbc9770e9 100644
--- a/sys/vm/vm_glue.c
+++ b/sys/vm/vm_glue.c
@@ -454,12 +454,18 @@ vm_thread_dispose(struct thread *td)
static int
kstack_import(void *arg, void **store, int cnt, int domain, int flags)
{
+ struct domainset *ds;
vm_object_t ksobj;
int i;
+ if (domain == UMA_ANYDOMAIN)
+ ds = DOMAINSET_RR();
+ else
+ ds = DOMAINSET_PREF(domain);
+
for (i = 0; i < cnt; i++) {
- store[i] = (void *)vm_thread_stack_create(
- DOMAINSET_PREF(domain), &ksobj, kstack_pages);
+ store[i] = (void *)vm_thread_stack_create(ds, &ksobj,
+ kstack_pages);
if (store[i] == NULL)
break;
}
More information about the freebsd-current
mailing list