Skip to content

Commit

Permalink
Revert r368523 which fixed contig allocs waiting forever.
Browse files Browse the repository at this point in the history
This needs to account for empty NUMA domains or domains which do not
satisfy the requested range.

Discussed with:	markj
  • Loading branch information
bdrewery committed Dec 15, 2020
1 parent cb4ff25 commit 5fee468
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions sys/vm/vm_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -264,15 +264,9 @@ kmem_alloc_attr_domainset(struct domainset *ds, vm_size_t size, int flags,
{
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);
Expand Down Expand Up @@ -352,15 +346,9 @@ kmem_alloc_contig_domainset(struct domainset *ds, vm_size_t size, int flags,
{
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);
Expand Down

0 comments on commit 5fee468

Please sign in to comment.