From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailsrv.cs.umass.edu (mailsrv.cs.umass.edu [128.119.240.136]) by sourceware.org (Postfix) with ESMTPS id 94886385F02A for ; Sat, 21 Mar 2020 04:59:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 94886385F02A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=cs.umass.edu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=moss@cs.umass.edu Received: from [150.203.106.61] (dhcp-liversidge61.anu.edu.au [150.203.106.61]) by mailsrv.cs.umass.edu (Postfix) with ESMTPSA id B312B401AF6C; Sat, 21 Mar 2020 00:59:25 -0400 (EDT) Reply-To: moss@cs.umass.edu Subject: Re: Why is taskset still not in util-linux? To: cygwin@cygwin.com References: <1348011a-261a-2a87-d361-4e51fa8dc19f@cs.umass.edu> <85ae12aa-6cc3-5d4c-5df2-25bf811ec6a9@maxrnd.com> <72fea68a-b3d7-e87c-726f-8a5a2587a992@maxrnd.com> <01e3d337-e5fe-f393-7634-3f1881bca315@cs.umass.edu> <79d7afa5-a07b-04df-c259-b76c61390f8c@maxrnd.com> From: Eliot Moss Message-ID: <92157259-166d-a85d-2db7-a8e30c75ec09@cs.umass.edu> Date: Sat, 21 Mar 2020 00:59:22 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <79d7afa5-a07b-04df-c259-b76c61390f8c@maxrnd.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS 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@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Mar 2020 04:59:36 -0000 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. Dear Mark: Once I did that properly, it built without commenting out that test. Yay! We still need to suppress building ionice, which requires patching configure.ac to provide a separate flag for that. And we still need to #define _GNU_SOURCE before the #include to make the sched_get/setaffinity calls visible. I intend to patch that into taskset.c unless you have a better way of doing it. When I do all this and use 'cygport compile', I get a taskset that appears to work ... as long as I run it in the place where it was built. When I install it, it fails, pretty silently. I have strace outputs from the two cases, but don't know enough about internals to interpret them. It seems that the failure is errno 2, ENOENT. The permissions on the file in the build area and the one in /usr/bin are the same (according to both getfacl and icacls) and they are on the same drive. 'cmp' indicates that the file contents are the same. It's pretty confusing. I've never seen anything like it. It doesn't matter if I give the full path '/usr/bin/taskset' or the shorter 'taskset'. The containing directories have slightly different permissions, but lots of other files in /usr/bin load and run. By running the version in the build directory on a somewhat long-running ls command, and using taskset -p on that running ls from another window, I verified that the affinity mask is indeed getting set. (It was less obvious to me how to tell which cpu it was actually running on.) Your thoughts about not being able to run the installed version? Eliot