delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2020/03/23/14:49:42

X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 94ADD385B832
Authentication-Results: sourceware.org; dmarc=none (p=none dis=none)
header.from=SystematicSw.ab.ca
Authentication-Results: sourceware.org;
spf=none smtp.mailfrom=brian DOT inglis AT systematicsw DOT ab DOT ca
X-Authority-Analysis: v=2.3 cv=LKf9vKe9 c=1 sm=1 tr=0
a=kiZT5GMN3KAWqtYcXc+/4Q==:117 a=kiZT5GMN3KAWqtYcXc+/4Q==:17
a=jpOVt7BSZ2e4Z31A5e1TngXxSK0=:19 a=IkcTkHD0fZMA:10 a=AMpejqzua1VCGlgbdkcA:9
a=QEXdDO2ut3YA:10
Subject: Re: Why is taskset still not in util-linux?
To: cygwin AT cygwin DOT com
References: <1348011a-261a-2a87-d361-4e51fa8dc19f AT cs DOT umass DOT edu>
<85ae12aa-6cc3-5d4c-5df2-25bf811ec6a9 AT maxrnd DOT com>
<72fea68a-b3d7-e87c-726f-8a5a2587a992 AT maxrnd DOT com>
<01e3d337-e5fe-f393-7634-3f1881bca315 AT cs DOT umass DOT edu>
<dca24f26-9da9-591c-19c1-8020e5de3a4e AT maxrnd DOT com>
<79d7afa5-a07b-04df-c259-b76c61390f8c AT maxrnd DOT com>
<92157259-166d-a85d-2db7-a8e30c75ec09 AT cs DOT umass DOT edu>
<99d74893-f9f8-4d8d-a400-dfe247660bf0 AT maxrnd DOT com>
<ad8159c0-db0d-2501-fe22-c295833725bc AT SystematicSw DOT ab DOT ca>
<20200323093158 DOT GA3261 AT calimero DOT vinschen DOT de>
<ee3b6112-dc3e-6245-0abe-8b5410515547 AT maxrnd DOT com>
From: Brian Inglis <Brian DOT Inglis AT SystematicSw DOT ab DOT ca>
Autocrypt: addr=Brian DOT Inglis AT SystematicSw DOT ab DOT ca; prefer-encr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3HZePvr8NV5LPCxLIE6bJCS8L5A
CgdNkrD3CLM1zePyiQ0dQ3+6Bjq27b3Y1UauiyKlOquCVkfrDk/y3OfFhbiJX8pwM0mICyls
8p9iM7yg+g1PbdoA99OrFc7JKllHRGDLQ0B/HKAPgNnLCenzDuV/d+N1RDbbpa0c/uvmoptR
Aejlq3HszXYQ9wTmu8OwVSITSkzgP1lKzyDPZS9SGvlrQp8AEQEAAYkBPAQYAQIAJgIbDBYh
BEy/sJ49FaN/AfIQJjY9ewCxhxqTBQJai9GnBQkNRM0aAAoJEDY9ewCxhxqTuL8H/ivw0VXX
lQW4c9O8XsMafDcEyV23MH4fdZACss+ZWluda7xIRo78GCLXxARHwJdOE9Jk9+/fDQOTZd4m
KW0trLCfWvJnwNJfOLbqse7eydvgdj2UrTpy4DO/5+mAw/ilgZpEGgwMwyqb/2kFiKK7Q64B
NKl8Y2kRXltaiXfqyvG2U/NiE4GOPA3yZgXs4Mzd1pzV/nkEIzGkneaeE5WGEWj/8dCnn6a3
zIuq0L59QInxKsTdt10OQiUoRKl8Nx0vDCOzMy0wlJc349gJbQBCAZcumtBBBqAzCAmJ3J7T
7ew8hznAEmOwr+LkSOdXFzEjdfTaryhN1AsRLYVUNloEWNA=
Organization: Systematic Software
Message-ID: <7339782b-9107-e1c8-6ff8-7a4dd48089b9@SystematicSw.ab.ca>
Date: Mon, 23 Mar 2020 12:48:50 -0600
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101
Thunderbird/68.6.0
MIME-Version: 1.0
In-Reply-To: <ee3b6112-dc3e-6245-0abe-8b5410515547@maxrnd.com>
X-CMAE-Envelope: MS4wfBG8WlzG0Qegd9yVx7PZ8ekeqiPp8zbmb3RJXsx4U1xvOMu209/K25lMWmqgKwfgalYvEEBoCCw7yT+F5EcU6PmQeR+0OksQmUpAeM1c8naHn0uBgJOW
5/lXoLWP6NX4ltNXx84oOdkKa7HArpbT+gQDcPLZpyymL3lz2XNocUDQoDfQfimA37Hv0GNtEkKEOg==
X-Spam-Status: No, score=-30.1 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS,
KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,
RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE,
TXREP autolearn=no autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <http://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <http://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <http://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Reply-To: cygwin AT cygwin DOT com
Errors-To: cygwin-bounces AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 02NInNFE022542

On 2020-03-23 03:42, Mark Geisert wrote:
> Corinna Vinschen wrote:
>> On Mar 21 10:41, Brian Inglis wrote:
>>> On 2020-03-21 02:18, Mark Geisert wrote:
>>>> Eliot Moss wrote:
>>>>> On 3/20/2020 1:54 AM, Mark Geisert wrote:
>>>>>> I've reproduced your snags. It/they are due to my having forgotten
>>>>>> another tiny update that should have been part of the
>>>>>> 2.33.1-cygwin-cpuset.patch file.  If you
>>>>>> 'echo "#define SYS_sched_getaffinity 42" > /usr/local/include/sys/syscall.h'
>>>>>> and then back out your other fix attempts, the build using cygport should
>>>>>> work.
>>>>> Once I did that properly, it built without commenting out that test. Yay!
>>>
>>>> I ended up installing Process Lasso to follow processes among the cpus and to
>>>> test the Cygwin affinity mask implementation.  It has a free trial period.  And
>>>> I wrote a simple test program that just advances from one cpu to the next
>>>> repeatedly, cpu-bound between steps, so PL can display the changing cpu.
>>>
>>> Anyone know if this feature support or what feature support will get top P/last
>>> used CPU and/or procps-ng P/sgi_p currently executing CPU and PSR/currently
>>> assigned CPU showing actual CPUs rather than 0/zero?
>>>
>>> Anyone know if or where or how this info is available on Windows or a link to
>>> it? I've looked at Google and SO results and nothing useful is apparent.
>>
>> Can't we just fake the calls?

The results are currently faked to CPU # 0.

> Brian is asking for a way to watch processes globally, as they are scheduled
> back and forth on the available cpus.  I was a bit sloppy in my wording above;
> what Process Lasso displays is the changing process affinity mask for a process
> I wrote to do just that.  I don't know of a way to ask Windows which cpu a
> process is currently scheduled onto.

You can also get and set affinity in Task Manager, and also ideal CPU info using
SysInternals Process Explorer, or PowerShell, which I use to launch Windows ntpd
at max realtime priority on CPU `nproc` - 1, as CMD arithmetic was nonexistent
or obscure years ago. I could probably redo that with CMD start.

Only documented CPU # call I could find was GetCurrentProcessorNumber (-Ex also
returns processor group) which tells the current thread where it's executing,
not the last or current CPU # assigned or used for other process threads.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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