delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2018/04/13/14:29:49

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:reply-to:subject:to:references:from:message-id
:date:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=RBjCGfV5KEVBX8YW
d/PNnInNhwdsl2RnRn7y77YDfjEGbWNFkOmJs94iv4E4nrsFmA2arUqKKkBlqVA3
lb5C1UDcYYNzY9FVN9Md6kb0ambksnrEchLyK9TH7JzmPBBRmxgP2wO5TJMLor2a
4alQ8RFnzH8rQ/4/D0RMoJbC+J4=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:reply-to:subject:to:references:from:message-id
:date:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=En0XzxYqKvliHTi5HY+byj
IKp2g=; b=hOXswKAoLJ9h8tiCao19bFmF1dQMmGmwx8C1raJ/85wy5Hm+UivfiE
3/wGGLWEz54p1RQpZoT9E2wf0zVLPLxqERKNpD1RvZsFz9v3XoIuPflZsyCne9V3
OpvRVmP580N81gVZRkYBg+7Mln2unz/wWtaKZWmGjKbF35hgNudxQ=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=H*Ad:D*ca
X-HELO: smtp-out-so.shaw.ca
X-Authority-Analysis: v=2.3 cv=OeS28CbY c=1 sm=1 tr=0 a=MVEHjbUiAHxQW0jfcDq5EA==:117 a=MVEHjbUiAHxQW0jfcDq5EA==:17 a=IkcTkHD0fZMA:10 a=XMieiRAVHrDds7vgfVQA:9 a=QEXdDO2ut3YA:10
Reply-To: Brian DOT Inglis AT SystematicSw DOT ab DOT ca
Subject: Re: More oddities with multiple processor groups
To: cygwin AT cygwin DOT com
References: <87in8xwre7 DOT fsf AT Rainer DOT invalid> <5AD0BAE5 DOT 2040904 AT tlinx DOT org>
From: Brian Inglis <Brian DOT Inglis AT SystematicSw DOT ab DOT ca>
Message-ID: <8829ca51-a131-a88b-4b36-00c965af0b2b@SystematicSw.ab.ca>
Date: Fri, 13 Apr 2018 12:29:31 -0600
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0
MIME-Version: 1.0
In-Reply-To: <5AD0BAE5.2040904@tlinx.org>
X-CMAE-Envelope: MS4wfBBnTaooPTgMpKEYrBmouwdpAAk3GPfHwfecxQY3Z6nm5d6YtWmUgVaB4NV0sZtxjLTJQM2fCDPZNTWZ//U1Qho3ris053GDYKtURLo7A0UNUK3PTvJO m2/dC66Spa/g+7M7yBm/902jyBKOOq+VwgaFlHFDQy1cGWJwwgcjUw/0Ef9BErgW9+cLZOxjw1KLcw==
X-IsSubscribed: yes

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019