Fix /proc/cpuinfo topology and cache size info
* autoload.cc (GetLogicalProcessorInformationEx): Import. (SetThreadGroupAffinity): Import. * fhandler_proc.cc (add_size): New macro. (get_msb): New inline function. (mask_bits): Ditto. (format_proc_cpuinfo): Drop handling of old CPUs. Check if we're running on a OS version supporting porcessor groups. If so, use SetThreadGroupAffinity to set thread affinity. Improve cache info to include 3rd level cache on Intel CPUs. Improve multi core info. * wincap.h (wincaps::has_processor_groups): New element. * wincap.cc: Implement above element throughout. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
parent
1e15b46737
commit
e0d48debed
|
@ -1,3 +1,17 @@
|
||||||
|
2015-08-13 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* autoload.cc (GetLogicalProcessorInformationEx): Import.
|
||||||
|
(SetThreadGroupAffinity): Import.
|
||||||
|
* fhandler_proc.cc (add_size): New macro.
|
||||||
|
(get_msb): New inline function.
|
||||||
|
(mask_bits): Ditto.
|
||||||
|
(format_proc_cpuinfo): Drop handling of old CPUs. Check if we're
|
||||||
|
running on a OS version supporting porcessor groups. If so, use
|
||||||
|
SetThreadGroupAffinity to set thread affinity. Improve cache info
|
||||||
|
to include 3rd level cache on Intel CPUs. Improve multi core info.
|
||||||
|
* wincap.h (wincaps::has_processor_groups): New element.
|
||||||
|
* wincap.cc: Implement above element throughout.
|
||||||
|
|
||||||
2015-08-10 Corinna Vinschen <corinna@vinschen.de>
|
2015-08-10 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* miscfuncs.cc: Fix comment preceeding x86_64 memset and friends.
|
* miscfuncs.cc: Fix comment preceeding x86_64 memset and friends.
|
||||||
|
|
|
@ -576,11 +576,13 @@ LoadDLLfunc (GetUdpTable, 12, iphlpapi)
|
||||||
|
|
||||||
LoadDLLfuncEx (CancelSynchronousIo, 4, kernel32, 1)
|
LoadDLLfuncEx (CancelSynchronousIo, 4, kernel32, 1)
|
||||||
LoadDLLfunc (CreateSymbolicLinkW, 12, kernel32)
|
LoadDLLfunc (CreateSymbolicLinkW, 12, kernel32)
|
||||||
|
LoadDLLfuncEx (GetLogicalProcessorInformationEx, 12, kernel32, 1)
|
||||||
LoadDLLfuncEx (GetNamedPipeClientProcessId, 8, kernel32, 1)
|
LoadDLLfuncEx (GetNamedPipeClientProcessId, 8, kernel32, 1)
|
||||||
LoadDLLfunc (GetSystemTimePreciseAsFileTime, 4, kernel32)
|
LoadDLLfunc (GetSystemTimePreciseAsFileTime, 4, kernel32)
|
||||||
LoadDLLfuncEx (IdnToAscii, 20, kernel32, 1)
|
LoadDLLfuncEx (IdnToAscii, 20, kernel32, 1)
|
||||||
LoadDLLfuncEx (IdnToUnicode, 20, kernel32, 1)
|
LoadDLLfuncEx (IdnToUnicode, 20, kernel32, 1)
|
||||||
LoadDLLfunc (LocaleNameToLCID, 8, kernel32)
|
LoadDLLfunc (LocaleNameToLCID, 8, kernel32)
|
||||||
|
LoadDLLfunc (SetThreadGroupAffinity, 12, kernel32)
|
||||||
LoadDLLfunc (SetThreadStackGuarantee, 4, kernel32)
|
LoadDLLfunc (SetThreadStackGuarantee, 4, kernel32)
|
||||||
|
|
||||||
/* ldap functions are cdecl! */
|
/* ldap functions are cdecl! */
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -5,11 +5,13 @@ What's new:
|
||||||
What changed:
|
What changed:
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
- Revert the following patch from 2.2.0:
|
|
||||||
When started from a non-Cygwin process, check if $HOME starts with a
|
|
||||||
slash (absolute POSIX path). Otherwise ignore it.
|
|
||||||
|
|
||||||
|
|
||||||
Bug Fixes
|
Bug Fixes
|
||||||
---------
|
---------
|
||||||
|
|
||||||
|
- Revert the following patch from 2.2.0:
|
||||||
|
When started from a non-Cygwin process, check if $HOME starts with a
|
||||||
|
slash (absolute POSIX path). Otherwise ignore it.
|
||||||
|
|
||||||
|
- Fix output of /proc/cpuinfo in terms of cpu topology and cache size for
|
||||||
|
modern CPUs and modern Windows OSes supporting more than 64 logical CPUs.
|
||||||
|
|
|
@ -49,6 +49,7 @@ wincaps wincap_xpsp2 __attribute__((section (".cygwin_dll_common"), shared)) = {
|
||||||
has_microsoft_accounts:false,
|
has_microsoft_accounts:false,
|
||||||
has_set_thread_stack_guarantee:false,
|
has_set_thread_stack_guarantee:false,
|
||||||
has_broken_rtl_query_process_debug_information:false,
|
has_broken_rtl_query_process_debug_information:false,
|
||||||
|
has_processor_groups:false,
|
||||||
};
|
};
|
||||||
|
|
||||||
wincaps wincap_2003 __attribute__((section (".cygwin_dll_common"), shared)) = {
|
wincaps wincap_2003 __attribute__((section (".cygwin_dll_common"), shared)) = {
|
||||||
|
@ -80,6 +81,7 @@ wincaps wincap_2003 __attribute__((section (".cygwin_dll_common"), shared)) = {
|
||||||
has_microsoft_accounts:false,
|
has_microsoft_accounts:false,
|
||||||
has_set_thread_stack_guarantee:true,
|
has_set_thread_stack_guarantee:true,
|
||||||
has_broken_rtl_query_process_debug_information:true,
|
has_broken_rtl_query_process_debug_information:true,
|
||||||
|
has_processor_groups:false,
|
||||||
};
|
};
|
||||||
|
|
||||||
wincaps wincap_vista __attribute__((section (".cygwin_dll_common"), shared)) = {
|
wincaps wincap_vista __attribute__((section (".cygwin_dll_common"), shared)) = {
|
||||||
|
@ -111,6 +113,7 @@ wincaps wincap_vista __attribute__((section (".cygwin_dll_common"), shared)) = {
|
||||||
has_microsoft_accounts:false,
|
has_microsoft_accounts:false,
|
||||||
has_set_thread_stack_guarantee:true,
|
has_set_thread_stack_guarantee:true,
|
||||||
has_broken_rtl_query_process_debug_information:false,
|
has_broken_rtl_query_process_debug_information:false,
|
||||||
|
has_processor_groups:false,
|
||||||
};
|
};
|
||||||
|
|
||||||
wincaps wincap_7 __attribute__((section (".cygwin_dll_common"), shared)) = {
|
wincaps wincap_7 __attribute__((section (".cygwin_dll_common"), shared)) = {
|
||||||
|
@ -142,6 +145,7 @@ wincaps wincap_7 __attribute__((section (".cygwin_dll_common"), shared)) = {
|
||||||
has_microsoft_accounts:false,
|
has_microsoft_accounts:false,
|
||||||
has_set_thread_stack_guarantee:true,
|
has_set_thread_stack_guarantee:true,
|
||||||
has_broken_rtl_query_process_debug_information:false,
|
has_broken_rtl_query_process_debug_information:false,
|
||||||
|
has_processor_groups:true,
|
||||||
};
|
};
|
||||||
|
|
||||||
wincaps wincap_8 __attribute__((section (".cygwin_dll_common"), shared)) = {
|
wincaps wincap_8 __attribute__((section (".cygwin_dll_common"), shared)) = {
|
||||||
|
@ -173,6 +177,7 @@ wincaps wincap_8 __attribute__((section (".cygwin_dll_common"), shared)) = {
|
||||||
has_microsoft_accounts:true,
|
has_microsoft_accounts:true,
|
||||||
has_set_thread_stack_guarantee:true,
|
has_set_thread_stack_guarantee:true,
|
||||||
has_broken_rtl_query_process_debug_information:false,
|
has_broken_rtl_query_process_debug_information:false,
|
||||||
|
has_processor_groups:true,
|
||||||
};
|
};
|
||||||
|
|
||||||
wincaps wincap_10 __attribute__((section (".cygwin_dll_common"), shared)) = {
|
wincaps wincap_10 __attribute__((section (".cygwin_dll_common"), shared)) = {
|
||||||
|
@ -204,6 +209,7 @@ wincaps wincap_10 __attribute__((section (".cygwin_dll_common"), shared)) = {
|
||||||
has_microsoft_accounts:true,
|
has_microsoft_accounts:true,
|
||||||
has_set_thread_stack_guarantee:true,
|
has_set_thread_stack_guarantee:true,
|
||||||
has_broken_rtl_query_process_debug_information:false,
|
has_broken_rtl_query_process_debug_information:false,
|
||||||
|
has_processor_groups:true,
|
||||||
};
|
};
|
||||||
|
|
||||||
wincapc wincap __attribute__((section (".cygwin_dll_common"), shared));
|
wincapc wincap __attribute__((section (".cygwin_dll_common"), shared));
|
||||||
|
|
|
@ -42,6 +42,7 @@ struct wincaps
|
||||||
unsigned has_microsoft_accounts : 1;
|
unsigned has_microsoft_accounts : 1;
|
||||||
unsigned has_set_thread_stack_guarantee : 1;
|
unsigned has_set_thread_stack_guarantee : 1;
|
||||||
unsigned has_broken_rtl_query_process_debug_information : 1;
|
unsigned has_broken_rtl_query_process_debug_information : 1;
|
||||||
|
unsigned has_processor_groups : 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
class wincapc
|
class wincapc
|
||||||
|
@ -98,6 +99,7 @@ public:
|
||||||
bool IMPLEMENT (has_microsoft_accounts)
|
bool IMPLEMENT (has_microsoft_accounts)
|
||||||
bool IMPLEMENT (has_set_thread_stack_guarantee)
|
bool IMPLEMENT (has_set_thread_stack_guarantee)
|
||||||
bool IMPLEMENT (has_broken_rtl_query_process_debug_information)
|
bool IMPLEMENT (has_broken_rtl_query_process_debug_information)
|
||||||
|
bool IMPLEMENT (has_processor_groups)
|
||||||
|
|
||||||
#undef IMPLEMENT
|
#undef IMPLEMENT
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue