[pacman-dev] Paralellising integrity checks
git at nezmer.info
Sat Feb 19 06:13:22 EST 2011
On Sat, Feb 19, 2011 at 04:26:56AM -0500, Tavian Barnes wrote:
> - There's no portable way to get the number of available cores. Where
> does platform-specific code go in libalpm? The way to do it on Linux
> is with sched_getaffinity(); sysconf(_SC_NPROCESSORS_ONLN) is almost
> as good and works on BSD too I believe.
No, I don't think it works on BSDs.
You can look at how x264 guys implemented this. Check out
x264_cpu_num_processors() in common/cpu.c in their source tree.
I'm not sure hard-coding supported platforms through ifdefs would be
accepted in pacman/libalpm.
> Also, I guess a major question would be: would this be likely to be
> merged? It's not a major issue, but it's also not a very large
> change. Every time there's a KDE update or something similarly large
> I find myself wishing that all 2/4/24 of my cores were being used for
> the the integrity checks.
> Tavian Barnes
More information about the pacman-dev