Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump Introduce RUMP_CURLWP compile option to select curl...
details: https://anonhg.NetBSD.org/src/rev/fb45b49f74b8
branches: trunk
changeset: 327774:fb45b49f74b8
user: pooka <pooka%NetBSD.org@localhost>
date: Sun Mar 16 15:31:03 2014 +0000
description:
Introduce RUMP_CURLWP compile option to select curlwp scheme.
Default is still "hypercall".
diffstat:
sys/rump/Makefile.rump | 14 +++++++++++++-
sys/rump/README.compileopts | 16 +++++++++++++++-
2 files changed, 28 insertions(+), 2 deletions(-)
diffs (58 lines):
diff -r 1d6d8a8d4b1a -r fb45b49f74b8 sys/rump/Makefile.rump
--- a/sys/rump/Makefile.rump Sun Mar 16 15:30:05 2014 +0000
+++ b/sys/rump/Makefile.rump Sun Mar 16 15:31:03 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.rump,v 1.93 2014/03/16 14:02:06 pooka Exp $
+# $NetBSD: Makefile.rump,v 1.94 2014/03/16 15:31:03 pooka Exp $
#
WARNS?= 3 # XXX: src/sys won't compile with -Wsign-compare yet
@@ -53,6 +53,18 @@
.endif
.endif
+.if defined(RUMP_CURLWP)
+.if ${RUMP_CURLWP} == "hypercall"
+CPPFLAGS+= -DRUMP_CURLWP=RUMP_CURLWP_HYPERCALL
+.elif ${RUMP_CURLWP} == "__thread"
+CPPFLAGS+= -DRUMP_CURLWP=RUMP_CURLWP___THREAD
+.elif ${RUMP_CURLWP} == "register"
+CPPFLAGS+= -DRUMP_CURLWP=RUMP_CURLWP_REGISTER
+.else
+.error Unsupported curlwp scheme: ${RUMP_CURLWP}
+.endif
+.endif
+
RUMP_DIAGNOSTIC?=yes
.if ${RUMP_DIAGNOSTIC} == "yes"
CPPFLAGS+= -DDIAGNOSTIC
diff -r 1d6d8a8d4b1a -r fb45b49f74b8 sys/rump/README.compileopts
--- a/sys/rump/README.compileopts Sun Mar 16 15:30:05 2014 +0000
+++ b/sys/rump/README.compileopts Sun Mar 16 15:31:03 2014 +0000
@@ -1,4 +1,4 @@
- $NetBSD: README.compileopts,v 1.2 2014/03/16 14:47:47 pooka Exp $
+ $NetBSD: README.compileopts,v 1.3 2014/03/16 15:31:03 pooka Exp $
This file describes compile-time options for rump kernels. Additionally,
NetBSD build options will have an effect. See src/share/mk/bsd.README
@@ -61,6 +61,20 @@
e.g. musl libc based Linux.
+ RUMP_CURLWP
+
+values: hypercall/__thread/register or <undefined>
+defval: <undefined>
+effect: Control how curlwp is obtained in a rump kernel. This is
+ a very frequently accessed thread-local variable, and optimizing
+ access has a significant performance impact. Note that all
+ options are not available on hosts/machine architectures.
+ <undefined> - use default implementation (currently "hypercall")
+ hypercall - use a hypercall to fetch the value
+ __thread - use the __thread feature to fetch value via TLS
+ register - use a dedicated register (implies -ffixed)
+
+
================================================================================
Home |
Main Index |
Thread Index |
Old Index