Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern The big pool allocators use pool_page_alloc(), whic...



details:   https://anonhg.NetBSD.org/src/rev/ed025553e7b7
branches:  trunk
changeset: 1000003:ed025553e7b7
user:      maxv <maxv%NetBSD.org@localhost>
date:      Sat Jun 29 11:13:23 2019 +0000

description:
The big pool allocators use pool_page_alloc(), which allocates page-aligned
storage. So if we switch to a big pool, set PR_NOALIGN, because the address
of the storage is not aligned to the item size.

Should fix PR/54319.

diffstat:

 sys/kern/subr_pool.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r dfa83175b174 -r ed025553e7b7 sys/kern/subr_pool.c
--- a/sys/kern/subr_pool.c      Sat Jun 29 10:34:59 2019 +0000
+++ b/sys/kern/subr_pool.c      Sat Jun 29 11:13:23 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: subr_pool.c,v 1.251 2019/06/13 01:13:12 christos Exp $ */
+/*     $NetBSD: subr_pool.c,v 1.252 2019/06/29 11:13:23 maxv Exp $     */
 
 /*
  * Copyright (c) 1997, 1999, 2000, 2002, 2007, 2008, 2010, 2014, 2015, 2018
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.251 2019/06/13 01:13:12 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_pool.c,v 1.252 2019/06/29 11:13:23 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -1959,6 +1959,7 @@
                        int bigidx = pool_bigidx(size);
 
                        palloc = &pool_allocator_big[bigidx];
+                       flags |= PR_NOALIGN;
                } else
                        palloc = &pool_allocator_nointr;
        }



Home | Main Index | Thread Index | Old Index