Hi Pieter, On Thu, Sep 17, 2015 at 09:52:42PM +0200, PiBa-NL wrote: > Hi Willy, > > Added support for cpu-map feature on FreeBSD. > It works, but only as long as the as the number of CPU's doesnt rise to > high <=64. While the cpuset_t supports up to 256 bits.
We're limited to 64 as well on linux. Anyway TCP stacks don't scale very well on connect() and close() in general so you should see a bottleneck much before 64 CPUs! > Maybe a better solution would be to create a separate function like done > here http://lxr.nginx.org/source/src/os/unix/ngx_setaffinity.c though > not sure thats needed.. Let's stay on this version for now. We've been facing a lot of issues in the past due to over-engineering, so let's wait for users to complain that 64 is not enough and only then we'll address that and we'll know why we do it. > Also i'm not sure you will like the IFDEF __FREEBSD__ thats used.?. I > couldnt find any other way to properly determine the correct function to > use though. No problem. We tend to avoid ifdefs in the middle of the code but in the lower layers it's not always possible (eg: some setsockopt calls only exist for certain OS). CPU affinity is very OS-specific as well so that's not a problem. > Hope its ok as is, and you can merge it? Yes, just done. Thank you! Willy

