]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
src/vstart.sh: add vstart --crimson-smp option
authorSamuel Just <sjust@redhat.com>
Fri, 9 Sep 2022 03:50:58 +0000 (03:50 +0000)
committerSamuel Just <sjust@redhat.com>
Tue, 27 Sep 2022 02:35:41 +0000 (19:35 -0700)
Signed-off-by: Samuel Just <sjust@redhat.com>
src/vstart.sh

index 04efc1f037b5544b56a96d1530bc1c8149a729cf..7aab8c5a1d679a54e4f1105fea2838159575ad8e 100755 (executable)
@@ -254,6 +254,7 @@ options:
        --jaeger: use jaegertracing for tracing
        --seastore-devs: comma-separated list of blockdevs to use for seastore
        --seastore-secondary-des: comma-separated list of secondary blockdevs to use for seastore
+       --crimson-smp: number of cores to use for crimson
 \n
 EOF
 
@@ -292,6 +293,7 @@ parse_secondary_devs() {
     done
 }
 
+crimson_smp=1
 while [ $# -ge 1 ]; do
 case $1 in
     -d | --debug)
@@ -507,6 +509,10 @@ case $1 in
         parse_secondary_devs --seastore-devs "$2"
         shift
         ;;
+    --crimson-smp)
+        crimson_smp=$2
+        shift
+        ;;
     --bluestore-spdk)
         [ -z "$2" ] && usage_exit
         IFS=',' read -r -a bluestore_spdk_dev <<< "$2"
@@ -962,8 +968,10 @@ start_osd() {
     do
        local extra_seastar_args
        if [ "$ceph_osd" == "crimson-osd" ]; then
-           # designate a single CPU node $osd for osd.$osd
-           extra_seastar_args="--smp 1 --cpuset $osd"
+        bottom_cpu=$(( osd * crimson_smp ))
+        top_cpu=$(( bottom_cpu + crimson_smp ))
+           # set a single CPU nodes for each osd
+           extra_seastar_args="--smp $crimson_smp --cpuset $bottom_cpu-$top_cpu"
            if [ "$debug" -ne 0 ]; then
                extra_seastar_args+=" --debug"
            fi