Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Jan 2023 15:42:55 +0300
From:      Dmitry Chagin <dchagin@heemeyer.club>
To:        Dmitry Chagin <dchagin@freebsd.org>
Cc:        src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org
Subject:   Re: git: 01f74ccd5a0d - main - libthr: Fix pthread_attr_[g|s]etaffinity_np to match it's manual and the kernel.
Message-ID:  <Y9Zpz0M1EVf2C6Zf@heemeyer.club>
In-Reply-To: <202301291238.30TCcKFb050951@gitrepo.freebsd.org>
References:  <202301291238.30TCcKFb050951@gitrepo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Jan 29, 2023 at 12:38:20PM +0000, Dmitry Chagin wrote:
> The branch main has been updated by dchagin:
> 
> URL: https://cgit.FreeBSD.org/src/commit/?id=01f74ccd5a0d1a444703e931339709c7de5296b5
> 
> commit 01f74ccd5a0d1a444703e931339709c7de5296b5
> Author:     Dmitry Chagin <dchagin@FreeBSD.org>
> AuthorDate: 2023-01-29 12:35:18 +0000
> Commit:     Dmitry Chagin <dchagin@FreeBSD.org>
> CommitDate: 2023-01-29 12:35:18 +0000
> 
>     libthr: Fix pthread_attr_[g|s]etaffinity_np to match it's manual and the kernel.
>     
>     Since f35093f8 semantics of a thread affinity functions is changed to be a
>     compatible with Linux:
>     
>     In case of getaffinity(), the minimum cpuset_t size that the kernel permits is
>     the maximum CPU id, present in the system, / NBBY bytes, the maximum size is not
>     limited.
>     In case of setaffinity(), the kernel does not limit the size of the user-provided
>     cpuset_t, internally using only the meaningful part of the set, where the upper
>     bound is the maximum CPU id, present in the system, no larger than the size of
>     the kernel cpuset_t.
>     
>     To match pthread_attr_[g|s]etaffinity_np checks of the user-provided cpusets to
>     the kernel behavior export the minimum cpuset_t size allowed by running kernel
>     via new sysctl kern.sched.cpusetsizemin and use it in checks.
>     
>     Reviewed by:

whoops, kib@ 





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Y9Zpz0M1EVf2C6Zf>