Date: Sun, 25 Aug 2019 12:55:32 -0400 From: Mark Johnston <markj@freebsd.org> To: Rebecca Cran <rebecca@bsdio.com> Cc: Konstantin Belousov <kostikbel@gmail.com>, FreeBSD Current <freebsd-current@freebsd.org> Subject: Re: Panic on boot with r351461 (AMD ThreadRipper 2990WX) Message-ID: <20190825165532.GB33382@raichu> In-Reply-To: <21865c12-9cb4-6560-1075-7cea5f83b30a@bsdio.com> References: <6e5687b2-ab3f-a570-37ab-72c8a9776167@bsdio.com> <20190824203305.GF71821@kib.kiev.ua> <d7200dbc-62b3-fd86-ca61-32d559987338@bsdio.com> <20190824230801.GK71821@kib.kiev.ua> <f15ba651-28ef-d9db-3646-ab8cb49b3d18@bsdio.com> <20190825062407.GL71821@kib.kiev.ua> <9e94aea8-7d63-0f9e-2f1e-c1492e9dc455@bsdio.com> <20190825143034.GO71821@kib.kiev.ua> <21865c12-9cb4-6560-1075-7cea5f83b30a@bsdio.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190825165532.GB33382>