4923 if (!UseNUMA && ForceNUMA) { |
4913 if (!UseNUMA && ForceNUMA) { |
4924 UseNUMA = true; |
4914 UseNUMA = true; |
4925 } |
4915 } |
4926 } |
4916 } |
4927 |
4917 |
4928 /*Liao:2013/11/18 UseOldNUMA: Let OldGen support NUMA*/ |
|
4929 if(UseNUMA == true && UseOldNUMA == true) { |
|
4930 UseOldNUMA = true; |
|
4931 } else { |
|
4932 UseOldNUMA = false; |
|
4933 } |
|
4934 |
|
4935 if(UseOldNUMA == false) { |
|
4936 UseNUMAGC = false; |
|
4937 UseNUMAThreadRoots = false; |
|
4938 UseNUMASteal = false; |
|
4939 BindGCTaskThreadsToCPUs = false; |
|
4940 } |
|
4941 |
|
4942 if (MaxFDLimit) { |
4918 if (MaxFDLimit) { |
4943 // set the number of file descriptors to max. print out error |
4919 // set the number of file descriptors to max. print out error |
4944 // if getrlimit/setrlimit fails but continue regardless. |
4920 // if getrlimit/setrlimit fails but continue regardless. |
4945 struct rlimit nbr_files; |
4921 struct rlimit nbr_files; |
4946 int status = getrlimit(RLIMIT_NOFILE, &nbr_files); |
4922 int status = getrlimit(RLIMIT_NOFILE, &nbr_files); |
5026 // Not yet implemented. |
5002 // Not yet implemented. |
5027 return false; |
5003 return false; |
5028 } |
5004 } |
5029 |
5005 |
5030 bool os::bind_to_processor(uint processor_id) { |
5006 bool os::bind_to_processor(uint processor_id) { |
5031 /* 2014/7/7 implemented by Liao */ |
5007 // Not yet implemented. |
5032 if(BindGCTaskThreadsToCPUs) { |
5008 return false; |
5033 cpu_set_t mask; |
|
5034 cpu_set_t get; |
|
5035 CPU_ZERO(&mask); |
|
5036 CPU_SET(processor_id, &mask); |
|
5037 |
|
5038 if(sched_setaffinity(0, sizeof(mask), &mask) == -1) { |
|
5039 tty->print_cr("Can't bind to processor_id = %d!", processor_id); |
|
5040 return false; |
|
5041 } |
|
5042 else { |
|
5043 return true; |
|
5044 } |
|
5045 } |
|
5046 else { |
|
5047 return false; |
|
5048 } |
|
5049 } |
5009 } |
5050 |
5010 |
5051 /// |
5011 /// |
5052 |
5012 |
5053 void os::SuspendedThreadTask::internal_do_task() { |
5013 void os::SuspendedThreadTask::internal_do_task() { |