The changes made for forcing non-default CPT partition counts in
commit
95d67b28076f7938a6c962a5256e9b581a439f71 now prevents
overriding libcfs module options using MODOPTS_LIBCFS, because
there is always the cpu_npartitions parameter specified at module
loading time that overrides the environment variable.
Instead add the cpu_npartitions=2 argument to the environment
variable instead of making it a parameter.
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I94bf500164dc23e81080bd2675646b5fa7500c1e
Reviewed-on: http://review.whamcloud.com/3999
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
fi
fi
- local ncpts=0
# if there is only one CPU core, libcfs can only create one partition
# if there is more than 4 CPU cores, libcfs should create multiple CPU
# partitions. So we just force libcfs to create 2 partitions for
if [ $ncpus -le 4 ] && [ $ncpus -gt 1 ]; then
# force to enable multiple CPU partitions
echo "Force libcfs to create 2 CPU partitions"
- ncpts=2
+ MODOPTS_LIBCFS="cpu_npartitions=2 $MODOPTS_LIBCFS"
else
echo "libcfs will create CPU partition based on online CPUs"
fi
- load_module ../libcfs/libcfs/libcfs cpu_npartitions=$ncpts
+ load_module ../libcfs/libcfs/libcfs
[ "$PTLDEBUG" ] && lctl set_param debug="$PTLDEBUG"
[ "$SUBSYSTEM" ] && lctl set_param subsystem_debug="${SUBSYSTEM# }"