------------------------------------------------------------
revno: 709
committer: Matthias Klose <[email protected]>
branch nick: openjdk8
timestamp: Mon 2017-07-24 23:02:59 +0200
message:
    [ Tiago Stürmer Daitx ]
    * patches/hotspot-ppc64el-S8181055-use-numa-v2-api.patch: mbind invalid
      argument message is still seen after S8175813; use numa_interleave_memory
      v2 api when available. LP: #1705763.
added:
  debian/patches/hotspot-ppc64el-S8181055-use-numa-v2-api.patch
modified:
  debian/changelog
  debian/rules


--
lp:~openjdk/openjdk/openjdk8
https://code.launchpad.net/~openjdk/openjdk/openjdk8

Your team Debian Java Maintainers is subscribed to branch 
lp:~openjdk/openjdk/openjdk8.
To unsubscribe from this branch go to 
https://code.launchpad.net/~openjdk/openjdk/openjdk8/+edit-subscription
=== modified file 'debian/changelog'
--- debian/changelog	2017-07-22 10:16:02 +0000
+++ debian/changelog	2017-07-24 21:02:59 +0000
@@ -1,10 +1,16 @@
 openjdk-8 (8u141-b15-2) UNRELEASED; urgency=medium
 
+  [ Matthias Klose ]
   * Update the m68k-support patch (Adrian Glaubitz). Closes: #864180.
   * Disable generation of jvmti.html on m68k (Adrian Glaubitz).
     Closes: #864205.
   * Disable the jamvm autopkg tests.
 
+  [ Tiago Stürmer Daitx ]
+  * patches/hotspot-ppc64el-S8181055-use-numa-v2-api.patch: mbind invalid
+    argument message is still seen after S8175813; use numa_interleave_memory
+    v2 api when available. LP: #1705763.
+
  -- Matthias Klose <[email protected]>  Sat, 22 Jul 2017 11:39:47 +0200
 
 openjdk-8 (8u141-b15-1) unstable; urgency=high
@@ -66,7 +72,6 @@
     invalid argument message when invoking UseNUMA on a system with
     non-consecutive numa topology. LP: #1697348.
 
-
  -- Matthias Klose <[email protected]>  Fri, 21 Jul 2017 13:51:05 +0200
 
 openjdk-8 (8u131-b11-2) unstable; urgency=medium

=== added file 'debian/patches/hotspot-ppc64el-S8181055-use-numa-v2-api.patch'
--- debian/patches/hotspot-ppc64el-S8181055-use-numa-v2-api.patch	1970-01-01 00:00:00 +0000
+++ debian/patches/hotspot-ppc64el-S8181055-use-numa-v2-api.patch	2017-07-24 21:02:59 +0000
@@ -0,0 +1,104 @@
+
+# HG changeset patch
+# User zgu
+# Date 1496858375 14400
+# Node ID d3cc20285653ad55dab95c6bd5430cb8afade2b8
+# Parent  f040971765427ce2c85afa46d950a89c0fbf97cc
+8181055: PPC64: "mbind: Invalid argument" still seen after 8175813
+Summary: Use numa_interleave_memory v2 api when available
+Reviewed-by: dholmes, shade, gromero
+
+--- a/hotspot/src/os/linux/vm/os_linux.cpp
++++ b/hotspot/src/os/linux/vm/os_linux.cpp
+@@ -2822,11 +2822,8 @@ extern "C" JNIEXPORT void numa_warn(int
+ extern "C" JNIEXPORT void numa_error(char *where) { }
+ extern "C" JNIEXPORT int fork1() { return fork(); }
+ 
+-
+-// If we are running with libnuma version > 2, then we should
+-// be trying to use symbols with versions 1.1
+-// If we are running with earlier version, which did not have symbol versions,
+-// we should use the base version.
++// Handle request to load libnuma symbol version 1.1 (API v1). If it fails
++// load symbol from base version instead.
+ void* os::Linux::libnuma_dlsym(void* handle, const char *name) {
+   void *f = dlvsym(handle, name, "libnuma_1.1");
+   if (f == NULL) {
+@@ -2835,6 +2832,12 @@ void* os::Linux::libnuma_dlsym(void* han
+   return f;
+ }
+ 
++// Handle request to load libnuma symbol version 1.2 (API v2) only.
++// Return NULL if the symbol is not defined in this particular version.
++void* os::Linux::libnuma_v2_dlsym(void* handle, const char* name) {
++  return dlvsym(handle, name, "libnuma_1.2");
++}
++
+ bool os::Linux::libnuma_init() {
+   // sched_getcpu() should be in libc.
+   set_sched_getcpu(CAST_TO_FN_PTR(sched_getcpu_func_t,
+@@ -2859,6 +2862,8 @@ bool os::Linux::libnuma_init() {
+                                             libnuma_dlsym(handle, "numa_tonode_memory")));
+       set_numa_interleave_memory(CAST_TO_FN_PTR(numa_interleave_memory_func_t,
+                                                 libnuma_dlsym(handle, "numa_interleave_memory")));
++      set_numa_interleave_memory_v2(CAST_TO_FN_PTR(numa_interleave_memory_v2_func_t,
++                                                libnuma_v2_dlsym(handle, "numa_interleave_memory")));
+       set_numa_set_bind_policy(CAST_TO_FN_PTR(numa_set_bind_policy_func_t,
+                                               libnuma_dlsym(handle, "numa_set_bind_policy")));
+       set_numa_bitmask_isbitset(CAST_TO_FN_PTR(numa_bitmask_isbitset_func_t,
+@@ -2978,6 +2983,7 @@ os::Linux::numa_num_configured_nodes_fun
+ os::Linux::numa_available_func_t os::Linux::_numa_available;
+ os::Linux::numa_tonode_memory_func_t os::Linux::_numa_tonode_memory;
+ os::Linux::numa_interleave_memory_func_t os::Linux::_numa_interleave_memory;
++os::Linux::numa_interleave_memory_v2_func_t os::Linux::_numa_interleave_memory_v2;
+ os::Linux::numa_set_bind_policy_func_t os::Linux::_numa_set_bind_policy;
+ os::Linux::numa_bitmask_isbitset_func_t os::Linux::_numa_bitmask_isbitset;
+ os::Linux::numa_distance_func_t os::Linux::_numa_distance;
+--- a/hotspot/src/os/linux/vm/os_linux.hpp
++++ b/hotspot/src/os/linux/vm/os_linux.hpp
+@@ -190,6 +190,8 @@ class Linux {
+   static void libpthread_init();
+   static bool libnuma_init();
+   static void* libnuma_dlsym(void* handle, const char* name);
++  // libnuma v2 (libnuma_1.2) symbols
++  static void* libnuma_v2_dlsym(void* handle, const char* name);
+   // Minimum stack size a thread can be created with (allowing
+   // the VM to completely create the thread and enter user code)
+   static size_t min_stack_allowed;
+@@ -250,6 +252,8 @@ private:
+   typedef int (*numa_available_func_t)(void);
+   typedef int (*numa_tonode_memory_func_t)(void *start, size_t size, int node);
+   typedef void (*numa_interleave_memory_func_t)(void *start, size_t size, unsigned long *nodemask);
++  typedef void (*numa_interleave_memory_v2_func_t)(void *start, size_t size, struct bitmask* mask);
++
+   typedef void (*numa_set_bind_policy_func_t)(int policy);
+   typedef int (*numa_bitmask_isbitset_func_t)(struct bitmask *bmp, unsigned int n);
+   typedef int (*numa_distance_func_t)(int node1, int node2);
+@@ -261,6 +265,7 @@ private:
+   static numa_available_func_t _numa_available;
+   static numa_tonode_memory_func_t _numa_tonode_memory;
+   static numa_interleave_memory_func_t _numa_interleave_memory;
++  static numa_interleave_memory_v2_func_t _numa_interleave_memory_v2;
+   static numa_set_bind_policy_func_t _numa_set_bind_policy;
+   static numa_bitmask_isbitset_func_t _numa_bitmask_isbitset;
+   static numa_distance_func_t _numa_distance;
+@@ -275,6 +280,7 @@ private:
+   static void set_numa_available(numa_available_func_t func) { _numa_available = func; }
+   static void set_numa_tonode_memory(numa_tonode_memory_func_t func) { _numa_tonode_memory = func; }
+   static void set_numa_interleave_memory(numa_interleave_memory_func_t func) { _numa_interleave_memory = func; }
++  static void set_numa_interleave_memory_v2(numa_interleave_memory_v2_func_t func) { _numa_interleave_memory_v2 = func; }
+   static void set_numa_set_bind_policy(numa_set_bind_policy_func_t func) { _numa_set_bind_policy = func; }
+   static void set_numa_bitmask_isbitset(numa_bitmask_isbitset_func_t func) { _numa_bitmask_isbitset = func; }
+   static void set_numa_distance(numa_distance_func_t func) { _numa_distance = func; }
+@@ -296,7 +302,10 @@ public:
+     return _numa_tonode_memory != NULL ? _numa_tonode_memory(start, size, node) : -1;
+   }
+   static void numa_interleave_memory(void *start, size_t size) {
+-    if (_numa_interleave_memory != NULL && _numa_all_nodes != NULL) {
++    // Use v2 api if available
++    if (_numa_interleave_memory_v2 != NULL && _numa_all_nodes_ptr != NULL) {
++      _numa_interleave_memory_v2(start, size, _numa_all_nodes_ptr);
++    } else if (_numa_interleave_memory != NULL && _numa_all_nodes != NULL) {
+       _numa_interleave_memory(start, size, _numa_all_nodes);
+     }
+   }

=== modified file 'debian/rules'
--- debian/rules	2017-07-21 13:59:23 +0000
+++ debian/rules	2017-07-24 21:02:59 +0000
@@ -448,7 +448,8 @@
 
 ifneq (,$(filter $(DEB_HOST_ARCH), ppc64 ppc64el))
   COMMON_PATCHES += \
-	hotspot-ppc64el-S8175813-mbind-invalid-argument.patch
+	hotspot-ppc64el-S8175813-mbind-invalid-argument.patch \
+	hotspot-ppc64el-S8181055-use-numa-v2-api.patch
 endif
 
 ifneq (,$(filter $(DEB_HOST_ARCH), kfreebsd-amd64 kfreebsd-i386))

__
This is the maintainer address of Debian's Java team
<http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-java-maintainers>. 
Please use
[email protected] for discussions and questions.

Reply via email to