Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Feb 2017 17:03:23 +0000 (UTC)
From:      Mateusz Guzik <mjg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r313391 - head/sys/kern
Message-ID:  <201702071703.v17H3NBh071984@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mjg
Date: Tue Feb  7 17:03:22 2017
New Revision: 313391
URL: https://svnweb.freebsd.org/changeset/base/313391

Log:
  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.
  
  Discussed with:	kib

Modified:
  head/sys/kern/init_main.c
  head/sys/kern/kern_thread.c

Modified: head/sys/kern/init_main.c
==============================================================================
--- head/sys/kern/init_main.c	Tue Feb  7 16:01:07 2017	(r313390)
+++ head/sys/kern/init_main.c	Tue Feb  7 17:03:22 2017	(r313391)
@@ -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: head/sys/kern/kern_thread.c
==============================================================================
--- head/sys/kern/kern_thread.c	Tue Feb  7 16:01:07 2017	(r313390)
+++ head/sys/kern/kern_thread.c	Tue Feb  7 17:03:22 2017	(r313391)
@@ -281,7 +281,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");
 }



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