forked from pool/haproxy
20b0b77293
1 OBS-URL: https://build.opensuse.org/request/show/298279 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/haproxy?expand=0&rev=27
33 lines
1.1 KiB
Diff
33 lines
1.1 KiB
Diff
From b34c00cd92deec0db473ffcf2c1da093c9337870 Mon Sep 17 00:00:00 2001
|
|
From: Willy Tarreau <w@1wt.eu>
|
|
Date: Mon, 20 Apr 2015 11:36:57 +0200
|
|
Subject: [PATCH 12/12] BUG/MEDIUM: init: don't limit cpu-map to the first 32
|
|
processes only
|
|
|
|
We have to allow 32 or 64 processes depending on the machine's word
|
|
size, and on 64-bit machines only the first 32 processes were properly
|
|
bound.
|
|
|
|
This fix should be backported to 1.5.
|
|
(cherry picked from commit e759749b50417895632c4e4481434f947176f28c)
|
|
---
|
|
src/haproxy.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/src/haproxy.c b/src/haproxy.c
|
|
index 7ec596c..0dddd53 100644
|
|
--- a/src/haproxy.c
|
|
+++ b/src/haproxy.c
|
|
@@ -1579,7 +1579,7 @@ int main(int argc, char **argv)
|
|
|
|
#ifdef USE_CPU_AFFINITY
|
|
if (proc < global.nbproc && /* child */
|
|
- proc < 32 && /* only the first 32 processes may be pinned */
|
|
+ proc < LONGBITS && /* only the first 32/64 processes may be pinned */
|
|
global.cpu_map[proc]) /* only do this if the process has a CPU map */
|
|
sched_setaffinity(0, sizeof(unsigned long), (void *)&global.cpu_map[proc]);
|
|
#endif
|
|
--
|
|
2.1.4
|
|
|