X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=meta-stx%2Frecipes-support%2Fpuppet%2Ffiles%2Fpuppet-drbd%2F0006-CGTS-7164-Add-resource-options-cpu-mask-to-affine-drbd-kernel-threads.patch;fp=meta-stx%2Frecipes-support%2Fpuppet%2Ffiles%2Fpuppet-drbd%2F0006-CGTS-7164-Add-resource-options-cpu-mask-to-affine-drbd-kernel-threads.patch;h=5c6aec170a2a4736756de52b14ed17757501934e;hb=57fdea704bd62af847872c40508f00aa1d7cac60;hp=0000000000000000000000000000000000000000;hpb=f23f21bccfb750b9e30141fd9676515215ffbc4e;p=pti%2Frtp.git diff --git a/meta-stx/recipes-support/puppet/files/puppet-drbd/0006-CGTS-7164-Add-resource-options-cpu-mask-to-affine-drbd-kernel-threads.patch b/meta-stx/recipes-support/puppet/files/puppet-drbd/0006-CGTS-7164-Add-resource-options-cpu-mask-to-affine-drbd-kernel-threads.patch new file mode 100644 index 0000000..5c6aec1 --- /dev/null +++ b/meta-stx/recipes-support/puppet/files/puppet-drbd/0006-CGTS-7164-Add-resource-options-cpu-mask-to-affine-drbd-kernel-threads.patch @@ -0,0 +1,68 @@ +From 0e264e7ac2b311aa9b42b183660a07b7e4e36b11 Mon Sep 17 00:00:00 2001 +From: Jim Gauld +Date: Fri, 9 Jun 2017 14:58:23 -0400 +Subject: [PATCH 1/1] CGTS-7164: Add resource options cpu-mask to affine drbd + kernel threads + +This adds "options { cpu-mask ; }" section to DRBD resource +configuration if 'cpumask' hexstring is defined. This governs kernel +threads: drbd_w_, drbd_r_, drbd_a_. + +Related notes: +- if cpumask is not specified, the kernel threads drbd_w_, drbd_r_, + drbd_a_, and drbd_as_ are affined to individual cores, each + on a different core. + +- the remainder of the kernel threads are governed by kernel boot + argument kthread_cpus=. i.e., drbd-reissue, drbd_submit, + jbd2/drbd-8, drbd_as_. + +- the drbd_a_ and drbd_as_ show up when DRBD is duplex. + +- the drbd_a_ threads have SCHED_RR scheduling policy. +--- + manifests/resource.pp | 3 +++ + templates/header.res.erb | 6 ++++++ + 2 files changed, 9 insertions(+) + +diff --git a/manifests/resource.pp b/manifests/resource.pp +index d19ad8b..17e6142 100644 +--- a/manifests/resource.pp ++++ b/manifests/resource.pp +@@ -26,6 +26,8 @@ + # [link_speed] replication link network speed mbps + # [num_parallel] number of parallel drbd filesystems to sync + # [rtt_ms] round-trip-time milliseconds (i.e., ping between replication nodes) ++# [cpumask] cpu-affinity-mask for DRBD kernel threads (hexidecimal notation). ++# 0 means spread over all CPUs of the machine. + define drbd::resource ( + $host1 = undef, + $host2 = undef, +@@ -48,6 +50,7 @@ define drbd::resource ( + $num_parallel = false, + $rtt_ms = false, + $resync_after = undef, ++ $cpumask = false, + $net_parameters = false, + $manage = true, + $ha_primary = false, +diff --git a/templates/header.res.erb b/templates/header.res.erb +index be53761..df52544 100644 +--- a/templates/header.res.erb ++++ b/templates/header.res.erb +@@ -29,6 +29,12 @@ resource <%= @name %> { + <% end -%> + } + ++<% if @cpumask -%> ++ options { ++ cpu-mask <%= @cpumask %>; ++ } ++<% end -%> ++ + net { + after-sb-0pri discard-zero-changes; + after-sb-1pri discard-secondary; +-- +1.8.3.1 +