Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Feb 2014 05:59:24 +0400
From:      Andrey Chernov <ache@freebsd.org>
To:        Andriy Gapon <avg@FreeBSD.org>, John Baldwin <jhb@FreeBSD.org>
Cc:        "freebsd-hackers@freebsd.org" <freebsd-hackers@FreeBSD.org>, "freebsd-arch@freebsd.org" <freebsd-arch@FreeBSD.org>
Subject:   Re: can the scheduler decide to schedule an interrupted but runnable thread on another CPU core? What are the implications for code?
Message-ID:  <52FEC9FC.20707@freebsd.org>
In-Reply-To: <52FEADC9.2040608@FreeBSD.org>
References:  <CAJ-Vmo=7Nz1jqXy%2BrTQ7u9_ZP7jeFOKUJxU1O51tYJjvTUmWTg@mail.gmail.com> <201402141318.44743.jhb@freebsd.org> <52FE5FBF.3090104@freebsd.org> <201402141410.29325.jhb@freebsd.org> <52FE93E6.6030705@freebsd.org> <52FE9A5E.5050300@freebsd.org> <52FEADC9.2040608@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 15.02.2014 3:59, Andriy Gapon wrote:
>> This is code example from cpuminer port, in case you are interested, it is very simple:
>>
>> static inline void affine_to_cpu(int id, int cpu)
>> {
>>         cpuset_t set;
>>         CPU_ZERO(&set);
>>         CPU_SET(cpu, &set);
>>         cpuset_setaffinity(CPU_LEVEL_WHICH, CPU_WHICH_CPUSET, -1, sizeof(cpuset_t), &set);
> 
> I think that CPU_WHICH_TID should have been used here.
> 

You are right, thanx!

-- 
http://ache.vniz.net/



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