svn commit: r315374 - stable/11/sys/kern

Mateusz Guzik mjg at FreeBSD.org
Thu Mar 16 06:12:02 UTC 2017


Author: mjg
Date: Thu Mar 16 06:12:00 2017
New Revision: 315374
URL: https://svnweb.freebsd.org/changeset/base/315374

Log:
  MFC r313391:
  
  Bump struct thread alignment to 32.
  
  This gives additional bits to use in locking primitives which store
  the lock thread pointer in the lock value.

Modified:
  stable/11/sys/kern/init_main.c
  stable/11/sys/kern/kern_thread.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/kern/init_main.c
==============================================================================
--- stable/11/sys/kern/init_main.c	Thu Mar 16 06:04:26 2017	(r315373)
+++ stable/11/sys/kern/init_main.c	Thu Mar 16 06:12:00 2017	(r315374)
@@ -99,7 +99,7 @@ void mi_startup(void);				/* Should be e
 static struct session session0;
 static struct pgrp pgrp0;
 struct	proc proc0;
-struct thread0_storage thread0_st __aligned(16);
+struct thread0_storage thread0_st __aligned(32);
 struct	vmspace vmspace0;
 struct	proc *initproc;
 

Modified: stable/11/sys/kern/kern_thread.c
==============================================================================
--- stable/11/sys/kern/kern_thread.c	Thu Mar 16 06:04:26 2017	(r315373)
+++ stable/11/sys/kern/kern_thread.c	Thu Mar 16 06:12:00 2017	(r315374)
@@ -283,7 +283,7 @@ threadinit(void)
 
 	thread_zone = uma_zcreate("THREAD", sched_sizeof_thread(),
 	    thread_ctor, thread_dtor, thread_init, thread_fini,
-	    16 - 1, UMA_ZONE_NOFREE);
+	    32 - 1, UMA_ZONE_NOFREE);
 	tidhashtbl = hashinit(maxproc / 2, M_TIDHASH, &tidhash);
 	rw_init(&tidhash_lock, "tidhash");
 }


More information about the svn-src-stable mailing list