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:
@ -49,6 +49,7 @@ wincaps wincap_xpsp2 __attribute__((section (".cygwin_dll_common"), shared)) = {
|
||||
has_microsoft_accounts:false,
|
||||
has_set_thread_stack_guarantee:false,
|
||||
has_broken_rtl_query_process_debug_information:false,
|
||||
has_processor_groups:false,
|
||||
};
|
||||
|
||||
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_set_thread_stack_guarantee:true,
|
||||
has_broken_rtl_query_process_debug_information:true,
|
||||
has_processor_groups:false,
|
||||
};
|
||||
|
||||
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_set_thread_stack_guarantee:true,
|
||||
has_broken_rtl_query_process_debug_information:false,
|
||||
has_processor_groups:false,
|
||||
};
|
||||
|
||||
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_set_thread_stack_guarantee:true,
|
||||
has_broken_rtl_query_process_debug_information:false,
|
||||
has_processor_groups:true,
|
||||
};
|
||||
|
||||
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_set_thread_stack_guarantee:true,
|
||||
has_broken_rtl_query_process_debug_information:false,
|
||||
has_processor_groups:true,
|
||||
};
|
||||
|
||||
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_set_thread_stack_guarantee:true,
|
||||
has_broken_rtl_query_process_debug_information:false,
|
||||
has_processor_groups:true,
|
||||
};
|
||||
|
||||
wincapc wincap __attribute__((section (".cygwin_dll_common"), shared));
|
||||
|
Reference in New Issue
Block a user