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:
@ -42,6 +42,7 @@ struct wincaps
|
||||
unsigned has_microsoft_accounts : 1;
|
||||
unsigned has_set_thread_stack_guarantee : 1;
|
||||
unsigned has_broken_rtl_query_process_debug_information : 1;
|
||||
unsigned has_processor_groups : 1;
|
||||
};
|
||||
|
||||
class wincapc
|
||||
@ -98,6 +99,7 @@ public:
|
||||
bool IMPLEMENT (has_microsoft_accounts)
|
||||
bool IMPLEMENT (has_set_thread_stack_guarantee)
|
||||
bool IMPLEMENT (has_broken_rtl_query_process_debug_information)
|
||||
bool IMPLEMENT (has_processor_groups)
|
||||
|
||||
#undef IMPLEMENT
|
||||
};
|
||||
|
Reference in New Issue
Block a user