This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: More oddities with multiple processor groups
- From: Brian Inglis <Brian dot Inglis at SystematicSw dot ab dot ca>
- To: cygwin at cygwin dot com
- Date: Fri, 13 Apr 2018 12:29:31 -0600
- Subject: Re: More oddities with multiple processor groups
- References: <87in8xwre7.fsf@Rainer.invalid> <5AD0BAE5.2040904@tlinx.org>
- Reply-to: Brian dot Inglis at SystematicSw dot ab dot ca
On 2018-04-13 08:12, L A Walsh wrote:
> Achim Gratz wrote:
>> The problem here is that on Linux you don't need to do anything extra to
>> use any of the advertised logical processors from a single application,
>> while on Windows you need to first create a thread and set it's affinity to
>> a different group than where your process was started in, then assign each
>> new thread an affinity to one of the available groups. If you don't do
>> that, all threads will be restricted to the original group.
> Not exactly true. They are not *restricted* -- it's a *feature* of the
> Windows scheduler, in that future procs/threads inherit the cpu of the
> parent. Linux's scheduler is more advanced as well as being replaceable. MS
> doesn't want you to do that
>> there might need to be some option to restrict Cygwin to a single processor
>> group for some applications to work (correctly).
> There is. Start them all on a single cpu & set the cpu mask. Pretty much
> the same way you restrict procs on linux -- you can run them with a specific
> cpu mask, and most programs will keep running w/that mask.
> Unfortunately, AFAIK, I don't think POSIX specifies a way to set affinities,
> so I'm not sure how cygwin would do it.
Glibc adds {pthread,sched}_...affinity... functions.
Linux uses namespaces, control groups (cgroups), cpusets, sysfs/kernfs:
util-linux provides unshare and taskset (not on Cygwin).
BSDs use cpu or processor sets functions and commands.
Mac OS X/Darwin supports either same or different thread cache affinity set and
tag /hints/ (which could be used like cpu sets), but only cache sharing cpu
counts, no explicit cpu identification or control.
--
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple