This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] sched_getaffinity() fails with -EINVAL


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 02/19/2010 07:43 AM, Sharyathi Nagesh wrote:
> Kosaki I am not completely convinced how we can suggest changes to
> kernel code. Meanwhile changing the interfaces to  *_S macros looks more
> appropriate

The kernel, for the slim probability that somebody uses hotplug CPUs and
increases the number of CPUs, always checks the maximum number of
configured CPUs fits in the cpu set.

An alternative would be to always just test the number of configured
CPUs at the time of the call.  This is backward compatible and wouldn't
hurt most people even with a maximum of 2048 CPUs.

Only if the bitset is really too small would we get errors.


The only problem is what to do if the number of online CPUs increases.I
think defaulting to off is just as valid a solution as accepting info in
setaffinity calls for CPUs which are unknown at the time of the call.

- -- 
â Ulrich Drepper â Red Hat, Inc. â 444 Castro St â Mountain View, CA â
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAkuQmXkACgkQ2ijCOnn/RHTspACgxqybNK6gI5uMDWFSipZ6wBVM
mj0AnR++CF76EUckMPAyyPSyQiSLaP7w
=zaWc
-----END PGP SIGNATURE-----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]