Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Dec 2020 19:38:16 +0000 (UTC)
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r368673 - head/sys/vm
Message-ID:  <202012151938.0BFJcG5X064671@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bdrewery
Date: Tue Dec 15 19:38:16 2020
New Revision: 368673
URL: https://svnweb.freebsd.org/changeset/base/368673

Log:
  Revert r368523 which fixed contig allocs waiting forever.
  
  This needs to account for empty NUMA domains or domains which do not
  satisfy the requested range.
  
  Discussed with:	markj

Modified:
  head/sys/vm/vm_kern.c

Modified: head/sys/vm/vm_kern.c
==============================================================================
--- head/sys/vm/vm_kern.c	Tue Dec 15 18:51:11 2020	(r368672)
+++ head/sys/vm/vm_kern.c	Tue Dec 15 19:38:16 2020	(r368673)
@@ -264,15 +264,9 @@ kmem_alloc_attr_domainset(struct domainset *ds, vm_siz
 {
 	struct vm_domainset_iter di;
 	vm_offset_t addr;
-	int domain, iflags;
+	int domain;
 
-	/*
-	 * Do not allow the domainset iterator to override wait flags.  The
-	 * contiguous memory allocator defines special semantics for M_WAITOK
-	 * that do not match the iterator's implementation.
-	 */
-	iflags = (flags & ~M_WAITOK) | M_NOWAIT;
-	vm_domainset_iter_policy_init(&di, ds, &domain, &iflags);
+	vm_domainset_iter_policy_init(&di, ds, &domain, &flags);
 	do {
 		addr = kmem_alloc_attr_domain(domain, size, flags, low, high,
 		    memattr);
@@ -352,15 +346,9 @@ kmem_alloc_contig_domainset(struct domainset *ds, vm_s
 {
 	struct vm_domainset_iter di;
 	vm_offset_t addr;
-	int domain, iflags;
+	int domain;
 
-	/*
-	 * Do not allow the domainset iterator to override wait flags.  The
-	 * contiguous memory allocator defines special semantics for M_WAITOK
-	 * that do not match the iterator's implementation.
-	 */
-	iflags = (flags & ~M_WAITOK) | M_NOWAIT;
-	vm_domainset_iter_policy_init(&di, ds, &domain, &iflags);
+	vm_domainset_iter_policy_init(&di, ds, &domain, &flags);
 	do {
 		addr = kmem_alloc_contig_domain(domain, size, flags, low, high,
 		    alignment, boundary, memattr);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202012151938.0BFJcG5X064671>