From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1672 invoked by alias); 12 Apr 2019 07:46:01 -0000 Mailing-List: contact cygwin-developers-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner@cygwin.com Mail-Followup-To: cygwin-developers@cygwin.com Received: (qmail 1397 invoked by uid 89); 12 Apr 2019 07:45:46 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-106.1 required=5.0 tests=AWL,BAYES_00,GOOD_FROM_CORINNA_CYGWIN,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=H*F:D*cygwin.com, desktop, Manager X-HELO: mout.kundenserver.de Received: from mout.kundenserver.de (HELO mout.kundenserver.de) (212.227.17.24) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 12 Apr 2019 07:45:44 +0000 Received: from calimero.vinschen.de ([24.134.7.25]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MmU9X-1gXIrf2xNp-00iQIm for ; Fri, 12 Apr 2019 09:45:34 +0200 Received: by calimero.vinschen.de (Postfix, from userid 500) id 82A98A806DE; Fri, 12 Apr 2019 09:45:33 +0200 (CEST) Date: Fri, 12 Apr 2019 07:46:00 -0000 From: Corinna Vinschen To: cygwin-developers@cygwin.com Subject: Re: Implement sched_[gs]etaffinity() Message-ID: <20190412074533.GT4248@calimero.vinschen.de> Reply-To: cygwin-developers@cygwin.com Mail-Followup-To: cygwin-developers@cygwin.com References: <20190411082516.GN4248@calimero.vinschen.de> <20190411083745.GO4248@calimero.vinschen.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="vkEkAx9hr54EJ73W" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.3 (2019-02-01) X-SW-Source: 2019-04/txt/msg00032.txt.bz2 --vkEkAx9hr54EJ73W Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 2149 On Apr 11 13:52, Mark Geisert wrote: > On Thu, 11 Apr 2019, Corinna Vinschen wrote: > > On Apr 11 10:25, Corinna Vinschen wrote: > > > Hi Mark, > > >=20 > > > On Apr 10 21:21, Mark Geisert wrote: > > > > I've recently sent a patch to cygwin-patches that implements these > > > > Linux-specific functions. I used the following test program to deb= ug and > > > > test the implementation. When the program is run, you can watch it= migrate > > > > from CPU to CPU with Windows Task Manager. > > > >=20 > > > > I've only tested on 64-bit Windows 7 so far. If the code (in the p= atch) is > > > > adequate I will supply another patch for doc updates, etc. > > >=20 > > > Your patch is nicely done, but what about machines with more than 64 > > > CPUs? Your patch only uses the standard API for up to 64 CPUs, so a > > > process can never use more than 64 CPUs or use CPUs from different CPU > > > groups. There was also the case of this weird machine Achim Gratz on= ce > > > worked on, which had less than 64 CPUs but *still* used multiple CPU > > > groups under Windows, for some reason. > > >=20 > > > Any chance you could update your patch to support this functionality? > > > For some info, see MSDN: > > >=20 > > > https://docs.microsoft.com/en-us/windows/desktop/ProcThread/processor= -groups > > >=20 > > > Also, there's already some code in fhandler_proc.cc, function > > > format_proc_cpuinfo to handle CPU groups. You can use the > > > wincap.has_processor_groups() method to check if the system > > > supports CPU groups. > >=20 > > Btw., Glibc's cpu_set_t supports up to 1024 CPUs. See > > https://sourceware.org/git/?p=3Dglibc.git;a=3Dblob;f=3Dposix/bits/cpu-s= et.h > > This may be ok for the foreseable future, I guess. >=20 > Hi Corinna, > I will look into CPU group support; thanks for the pointers. I also need= to > fix the assumption I made about which flavor of pid would be handed to the > functions.. they will be Cygwin pids but need conversion to Windows pids > internally. Yeah, right, I missed to notice that. I'll add a few notes inline over @ cygwin-patches. Corinna --=20 Corinna Vinschen Cygwin Maintainer --vkEkAx9hr54EJ73W Content-Type: application/pgp-signature; name="signature.asc" Content-length: 833 -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAlywQh0ACgkQ9TYGna5E T6AD1RAAoYoBGwk+myxjlTHFjF6wsyE8vhTAlMh0rBK17aDGAzhpOGTScdf2K9S6 CIi6gFZq3ZJL97FWIe83e8v/1cj3mz5RPBlRn/MlW+Tmsg+GGpEtvCuvcHjXRZpY Icm+JE3mcT684FpiyQjQvFkO1VaCEQO9c2mKWvlfDAHDJ13mMDnNtcbRdsSdVMyS h2PZDkCEcyFWtTjQzpoh0mKpVS/i8JTdqnDAPOGrk6PQhv/a7WQJUzBm3cKxLrBZ OsKXTUOh6N8CkJCmMcG8i8HRmpP+bjZym+cgN63wLFaE0K3eo4/az5+dhuQ+jVYe Pz9sX23lUXP9c+qPxWKjNlYHkCrsKgO1wj+HCjy3X+37H9+1ESfUCfWP0YqF7QwI 49XBHz8xY6INnA5REsLKwb2v+n8+VtZaBTTmwC45s5TJa7jWtAyqo3pZV42qHTmV yCt1eGZuyIct+rTidHrMQQ1nMnDH1/Xl//cjDepB3hUZMFGAbXgRarDCHVp/KrSc 9+Y/vjXkZWpYdwXZoVK+iHRdf0BDgc4P5CwSyfwdzaWZI5R6ldvhhB5M1tjAt1/p Fq50+drKBGiU8f45hGyw7lQSM59k7YqoEL7piY7XSyjTLwlFr6DlLg1Vxt0DzvUX aCqJqDi/vdkShiPdqcmwsHqd8Y87zcXqnGzjS1HxWQZJdr9aY/k= =MZ8b -----END PGP SIGNATURE----- --vkEkAx9hr54EJ73W--