Skip to content

Commit

Permalink
Fix MIN_ABT_THREAD_STACKSIZE_FOR_DCPM value and tests
Browse files Browse the repository at this point in the history
PR-repos: pmdk@PR-38:11

Priority: 2
Cancel-prev-build: false

Skip-nlt: false
Skip-unit-tests: false
Skip-func-test-vm: false
Skip-test-rpms: false
Allow-unstable-test: true
Skip-func-hw-test-large: true
Skip-func-hw-test-medium: false
Skip-func-hw-test-medium-verbs-provider: true

Required-githooks: true

Signed-off-by: Tomasz Gromadzki <[email protected]>
  • Loading branch information
grom72 committed Aug 28, 2024
1 parent 3cfa443 commit 9527e1d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/control/cmd/dmg/auto_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,8 @@ engines:
provider: ofi+verbs
fabric_iface: ib0
fabric_iface_port: 31416
env_vars:
- ABT_THREAD_STACKSIZE=18432
pinned_numa_node: 0
- targets: 6
nr_xs_helpers: 0
Expand All @@ -583,6 +585,8 @@ engines:
provider: ofi+verbs
fabric_iface: ib1
fabric_iface_port: 32416
env_vars:
- ABT_THREAD_STACKSIZE=18432
pinned_numa_node: 1
disable_vfio: false
disable_vmd: false
Expand Down
14 changes: 12 additions & 2 deletions src/control/server/engine/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const (
envLogDbgStreams = "DD_MASK"
envLogSubsystems = "DD_SUBSYS"

MIN_ABT_THREAD_STACKSIZE_FOR_DCPM = 184320
MIN_ABT_THREAD_STACKSIZE_FOR_DCPM = 18432
)

// FabricConfig encapsulates networking fabric configuration.
Expand Down Expand Up @@ -357,7 +357,7 @@ func (c *Config) Validate() error {
} else {
i, err1 := strconv.Atoi(stacksize)
if err != nil || err1 != nil || i < MIN_ABT_THREAD_STACKSIZE_FOR_DCPM {
return errors.New(fmt.Sprintf("env_var ABT_THREAD_STACKSIZE should >= %d for `dcpm` storage class",
return errors.New(fmt.Sprintf("env_var ABT_THREAD_STACKSIZE should be >= %d for `dcpm` storage class",
MIN_ABT_THREAD_STACKSIZE_FOR_DCPM))
}
}
Expand Down Expand Up @@ -500,6 +500,10 @@ func (c *Config) WithSystemName(name string) *Config {
func (c *Config) WithStorage(cfgs ...*storage.TierConfig) *Config {
c.Storage.Tiers = storage.TierConfigs{}
c.AppendStorage(cfgs...)
if len(c.Storage.Tiers) > 0 && c.Storage.Tiers[0].IsSCM() &&
c.Storage.Tiers[0].Class == storage.ClassDcpm {
return c.WithStackSizeForDCPM()
}
return c
}

Expand Down Expand Up @@ -710,3 +714,9 @@ func (c *Config) WithStorageIndex(i uint32) *Config {
c.Storage.EngineIdx = uint(i)
return c
}

func (c *Config) WithStackSizeForDCPM() *Config {
c.EnvVars = append(c.EnvVars, fmt.Sprintf("ABT_THREAD_STACKSIZE=%d",
MIN_ABT_THREAD_STACKSIZE_FOR_DCPM))
return c
}

0 comments on commit 9527e1d

Please sign in to comment.