Skip to content

Commit 659e283

Browse files
authored
Cgroup Integration minor fixes (#213)
--- Signed-off-by: Kartik Nema <kartnema@qti.qualcomm.com>
1 parent 0822c97 commit 659e283

4 files changed

Lines changed: 8 additions & 10 deletions

File tree

configs/InitConfig.yaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ InitConfigs:
1212
- Name: "user.slice"
1313
Create: false
1414
ID: 3
15-
- Name: "focused.slice/focused.apps"
15+
- Name: "urm.slice/focused.apps"
1616
Create: true
1717
ID: 4
18-
- Name: "focused.slice"
19-
Create: false
20-
ID: 5

docs/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ Logical IDs for cgroups. Configs of cgroups map in InitConfigs->CgroupsInfo sect
321321
| 1 | "init.scope" |
322322
| 2 | "system.slice" |
323323
| 3 | "user.slice" |
324-
| 4 | "focused.slice" |
324+
| 4 | "urm.slice" |
325325

326326
**Mpam Groups Map**
327327
Logical IDs for MPAM groups. Configs of MPAM group map in InitConfigs->MpamGroupsInfo section
@@ -805,7 +805,7 @@ InitConfigs:
805805
- Name: "user.slice"
806806
Create: false
807807
ID: 3
808-
- Name: "focused.slice/app.slice"
808+
- Name: "urm.slice/focused.apps"
809809
Create: true
810810
ID: 4
811811
```

modula/CoreModules/UrmSettings.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const std::string UrmSettings::mDeviceNamePath =
5757
const std::string UrmSettings::mBaseCGroupPath =
5858
"/sys/fs/cgroup/";
5959
const std::string UrmSettings::focusedCgroup =
60-
"focused.slice";
60+
"urm.slice/focused.apps";
6161

6262
const std::string UrmSettings::mPersistenceFile =
6363
"/etc/urm/data/resource_original_values.txt";

resource-tuner/init/RestuneInit.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -483,8 +483,9 @@ static void configureFocusedSlice() {
483483
{"cgroup.max.descendants", "10"},
484484
};
485485

486+
std::string cGroupPath = UrmSettings::focusedCgroup;
486487
for(size_t i = 0; i < sizeof(cgroupParam) / sizeof(cgroupParam[0]); i++) {
487-
setCgroupParam(UrmSettings::focusedCgroup.c_str(), cgroupParam[i][0], cgroupParam[i][1]);
488+
setCgroupParam(cGroupPath, cgroupParam[i][0], cgroupParam[i][1]);
488489
}
489490
}
490491

@@ -597,7 +598,7 @@ static ErrCode init(void* arg) {
597598
// Initialize external features
598599
ExtFeaturesRegistry::getInstance()->initializeFeatures();
599600

600-
// Configure focused.slice parameters
601+
// Configure urm.slice parameters
601602
configureFocusedSlice();
602603

603604
// Create the Processor thread:
@@ -611,7 +612,7 @@ static ErrCode init(void* arg) {
611612
// Wait for the thread to initialize
612613
std::this_thread::sleep_for(std::chrono::milliseconds(300));
613614

614-
// Start the Pulse Monitor and Garbage Collector Daemon Threads
615+
// Start the Pulse Monitor and Garbage Collector Daemon Threads
615616
if(RC_IS_NOTOK(startPulseMonitorDaemon())) {
616617
TYPELOGD(PULSE_MONITOR_INIT_FAILED);
617618
return RC_MODULE_INIT_FAILURE;

0 commit comments

Comments
 (0)