diff src/os/solaris/vm/os_solaris.hpp @ 144:e3729351c946

6697534: Premature GC and invalid lgrp selection with NUMA-aware allocator. Summary: Don't move tops of the chunks in ensure_parsibility(). Handle the situation with Solaris when a machine has a locality group with no memory. Reviewed-by: apetrusenko, jcoomes, ysr
author iveresov
date Fri, 09 May 2008 16:34:08 +0400
parents 8d84e28e68ba
children d1605aabd0a1
line wrap: on
line diff
--- a/src/os/solaris/vm/os_solaris.hpp	Tue May 06 15:37:36 2008 -0700
+++ b/src/os/solaris/vm/os_solaris.hpp	Fri May 09 16:34:08 2008 +0400
@@ -66,6 +66,7 @@
 
   typedef uintptr_t       lgrp_cookie_t;
   typedef id_t            lgrp_id_t;
+  typedef int             lgrp_rsrc_t;
   typedef enum lgrp_view {
         LGRP_VIEW_CALLER,       /* what's available to the caller */
         LGRP_VIEW_OS            /* what's available to operating system */
@@ -77,6 +78,9 @@
   typedef lgrp_id_t (*lgrp_root_func_t)(lgrp_cookie_t cookie);
   typedef int (*lgrp_children_func_t)(lgrp_cookie_t  cookie,  lgrp_id_t  parent,
                                       lgrp_id_t *lgrp_array, uint_t lgrp_array_size);
+  typedef int (*lgrp_resources_func_t)(lgrp_cookie_t  cookie,  lgrp_id_t  lgrp,
+                                      lgrp_id_t *lgrp_array, uint_t lgrp_array_size,
+                                      lgrp_rsrc_t type);
   typedef int (*lgrp_nlgrps_func_t)(lgrp_cookie_t cookie);
   typedef int (*lgrp_cookie_stale_func_t)(lgrp_cookie_t cookie);
   typedef int (*meminfo_func_t)(const uint64_t inaddr[],   int addr_count,
@@ -88,6 +92,7 @@
   static lgrp_fini_func_t _lgrp_fini;
   static lgrp_root_func_t _lgrp_root;
   static lgrp_children_func_t _lgrp_children;
+  static lgrp_resources_func_t _lgrp_resources;
   static lgrp_nlgrps_func_t _lgrp_nlgrps;
   static lgrp_cookie_stale_func_t _lgrp_cookie_stale;
   static lgrp_cookie_t _lgrp_cookie;
@@ -109,7 +114,6 @@
   static int (*get_libjsig_version)();
   static void save_preinstalled_handler(int, struct sigaction&);
   static void check_signal_handler(int sig);
-
   // For overridable signals
   static int _SIGinterrupt;                  // user-overridable INTERRUPT_SIGNAL
   static int _SIGasync;                      // user-overridable ASYNC_SIGNAL
@@ -253,8 +257,9 @@
   static void set_lgrp_init(lgrp_init_func_t func) { _lgrp_init = func; }
   static void set_lgrp_fini(lgrp_fini_func_t func) { _lgrp_fini = func; }
   static void set_lgrp_root(lgrp_root_func_t func) { _lgrp_root = func; }
-  static void set_lgrp_children(lgrp_children_func_t func) { _lgrp_children = func; }
-  static void set_lgrp_nlgrps(lgrp_nlgrps_func_t func)     { _lgrp_nlgrps = func; }
+  static void set_lgrp_children(lgrp_children_func_t func)   { _lgrp_children = func; }
+  static void set_lgrp_resources(lgrp_resources_func_t func) { _lgrp_resources = func; }
+  static void set_lgrp_nlgrps(lgrp_nlgrps_func_t func)       { _lgrp_nlgrps = func; }
   static void set_lgrp_cookie_stale(lgrp_cookie_stale_func_t func) { _lgrp_cookie_stale = func; }
   static void set_lgrp_cookie(lgrp_cookie_t cookie)  { _lgrp_cookie = cookie; }
 
@@ -266,6 +271,12 @@
                     lgrp_id_t *lgrp_array, uint_t lgrp_array_size) {
     return _lgrp_children != NULL ? _lgrp_children(cookie, parent, lgrp_array, lgrp_array_size) : -1;
   }
+  static int lgrp_resources(lgrp_cookie_t  cookie,  lgrp_id_t  lgrp,
+                            lgrp_id_t *lgrp_array, uint_t lgrp_array_size,
+                            lgrp_rsrc_t type) {
+    return _lgrp_resources != NULL ? _lgrp_resources(cookie, lgrp, lgrp_array, lgrp_array_size, type) : -1;
+  }
+
   static int lgrp_nlgrps(lgrp_cookie_t cookie)       { return _lgrp_nlgrps != NULL ? _lgrp_nlgrps(cookie) : -1; }
   static int lgrp_cookie_stale(lgrp_cookie_t cookie) {
     return _lgrp_cookie_stale != NULL ? _lgrp_cookie_stale(cookie) : -1;