From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by sourceware.org (Postfix) with ESMTP id ED013385F01B for ; Fri, 20 Mar 2020 13:50:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org ED013385F01B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=cygwin.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=yselkowitz@cygwin.com Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-473-qOR-UxJpN5ShGss2Hl6cWw-1; Fri, 20 Mar 2020 09:39:26 -0400 X-MC-Unique: qOR-UxJpN5ShGss2Hl6cWw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3067C8024D9 for ; Fri, 20 Mar 2020 13:39:25 +0000 (UTC) Received: from ovpn-117-160.rdu2.redhat.com (ovpn-117-160.rdu2.redhat.com [10.10.117.160]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B0D835C1D8 for ; Fri, 20 Mar 2020 13:39:24 +0000 (UTC) Message-ID: Subject: Re: Why is taskset still not in util-linux? From: Yaakov Selkowitz To: cygwin@cygwin.com Date: Fri, 20 Mar 2020 09:39:23 -0400 In-Reply-To: <79d7afa5-a07b-04df-c259-b76c61390f8c@maxrnd.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> User-Agent: Evolution 3.34.4 (3.34.4-1.fc31) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: cygwin.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NEUTRAL 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: Fri, 20 Mar 2020 13:50:38 -0000 On Thu, 2020-03-19 at 22:54 -0700, Mark Geisert wrote: > Mark Geisert wrote: > > Eliot Moss wrote: > > > On 3/16/2020 7:34 PM, Mark Geisert wrote: > > > > Mark Geisert wrote: > > > >> Eliot Moss wrote: > > > >>> > > > >>> Dear cygwin-ers -- > > > >>> > > > >>> Something I had asked about a while ago was the absence os tasks= et in=20 > > > cygwin's > > > >>> util-linux. At the time, it was pointed out that the necessary = get/set > > > >>> affinity library/system calls were not yet supported. These wer= e added a > > > >>> while ago, so it would seem that taskset ought to work. In fact= , I think > > > >>> someone got it going on their own. Can we add it to util-linux = now, > > > >>> officially? I think this was intended but perhaps was overlooke= d or > > > >>> something. > > > >> > > > >> Report noted; thanks. A solution is being worked. > > > > > > > > There's been no forward progress on this. If you're comfortable g= etting=20 > > > the util-linux source > > > > package through Cygwin setup*.exe, you can follow the steps shown = in > > > > https://cygwin.com/pipermail/cygwin-apps/2020-March/039855.html to= build=20 > > > (with cygport) a local copy > > > > of util-linux that includes a taskset.exe you can move into /usr/l= ocal/bin,=20 > > > for example. > > > > > > > > You might try that route if you're up for it. Feel free to ask qu= estions=20 > > > here if you hit a snag. > > > > HTH, > > >=20 > > > Thank you, Mark. I decided to give it a try and got some distance, b= ut hit a=20 > > > snag. > > >=20 > > > First, I had to change configure.ac to add control to disable ionice = (Cygwin > > > does not support a required syscall) while still trying to build task= set. > > > Previously taskset and ionice (and one other program) were controlled= by the > > > single --enable-schedutils. > > >=20 > > > Now, including sched.h does not provide the prototypes for sched_geta= ffinity, > > > etc. I found a previous post that suggests we need to do -D_GNU_SOUR= CE for it > > > to work. I am not sure of the best place to stick that, but I will s= ee about > > > maybe a one line patch to taskset.c or something. > >=20 > > Rats. Sorry you've hit some snags. Are you compiling directly with 'm= ake' or=20 > > the preferred 'cygport util-linux.cygport build'? With the latter I di= dn't need=20 > > to make any changes to the source tree; all mods were accomplished with= the new=20 > > patch file and changes to util-linux.cygport itself. >=20 > I've reproduced your snags. It/they are due to my having forgotten anoth= er tiny=20 > update that should have been part of the 2.33.1-cygwin-cpuset.patch file.= If=20 > you 'echo "#define SYS_sched_getaffinity 42" > /usr/local/include/sys/sys= call.h'=20 > and then back out your other fix attempts, the build using cygport should= work. Cygwin doesn't support syscalls. I'd be very wary of any code which is conditional on any #ifdef SYS_*. -- Yaakov