- Added warning if hyperthreading is enabled.
parent
37a19ffc88
commit
2560098986
|
@ -0,0 +1,25 @@
|
|||
#!/bin/bash
|
||||
|
||||
RED='\033[0;31m'
|
||||
CYAN='\033[0;36m'
|
||||
YELLOW='\033[1;33m'
|
||||
LIGHTRED='\033[1;31m'
|
||||
NC='\033[0m' # No Color
|
||||
#str=$(grep -o '^flags\b.*: .*\bht\b' /proc/cpuinfo | tail -1)
|
||||
nproc=$(grep -i "processor" /proc/cpuinfo | sort -u | wc -l)
|
||||
phycore=$(cat /proc/cpuinfo | egrep "core id|physical id" | tr -d "\n" | sed s/physical/\\nphysical/g | grep -v ^$ | sort | uniq | wc -l)
|
||||
|
||||
if [ -z "$(echo "$phycore *2" | bc | grep $nproc)" ]
|
||||
then
|
||||
str=""
|
||||
else
|
||||
str="ht-enabled"
|
||||
fi
|
||||
|
||||
|
||||
if [ "$str" ]
|
||||
then
|
||||
printf "${RED}mTCP works best when hyperthreading is DISABLED. Please disable this feature from BIOS.${NC}\n"
|
||||
fi
|
||||
|
||||
printf "${CYAN}Type ${YELLOW}make${CYAN} to compile mTCP ${LIGHTRED}src/${CYAN} and ${LIGHTRED}apps/${CYAN}.${NC}\n"
|
|
@ -10981,3 +10981,5 @@ if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
|
|||
$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
|
||||
fi
|
||||
|
||||
|
||||
bash ./.check_hyperthreading.sh
|
||||
|
|
|
@ -121,3 +121,5 @@ AC_OUTPUT(mtcp/src/Makefile)
|
|||
AC_OUTPUT(apps/example/Makefile)
|
||||
AC_OUTPUT(util/Makefile)
|
||||
AC_OUTPUT(io_engine/lib/Makefile)
|
||||
|
||||
bash ./.check_hyperthreading.sh
|
||||
|
|
Loading…
Reference in New Issue