Fork Vasum on GitHub Official Vasum Wiki on Tizen.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
resources-config.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Contact: Dariusz Michaluk <d.michaluk@samsung.com>
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License
17  */
18 
25 #ifndef RESOURCES_CONFIG_HPP
26 #define RESOURCES_CONFIG_HPP
27 
28 #include "config.hpp"
29 #include "cargo/fields.hpp"
30 
31 #include "cgroups-config.hpp"
32 
33 namespace vasum {
34 
35 struct Rlimit {
36 
40  std::string type;
41 
46  uint64_t hard;
47  uint64_t soft;
48 
50  (
51  type,
52  hard,
53  soft
54  )
55 };
56 
57 typedef std::vector<Rlimit> RlimitsConfig;
58 
60 
68 
70  (
72  memory,
73  cpu,
74  pids,
75  blockIO,
77  network
78  )
79 };
80 
81 } // namespace vasum
82 
83 
84 #endif // RESOURCES_CONFIG_HPP
uint64_t soft
Definition: resources-config.hpp:47
std::vector< Rlimit > RlimitsConfig
Definition: resources-config.hpp:57
uint64_t hard
Kernel enforces the soft limit for a resource, the hard limit acts as a ceiling for that value that c...
Definition: resources-config.hpp:46
CGroupBlockIOConfig blockIO
Definition: resources-config.hpp:65
CGroupPidsConfig pids
Definition: resources-config.hpp:64
CGroupCpuConfig cpu
Definition: resources-config.hpp:63
Definition: cgroups-config.hpp:269
Configuration file for the code.
CGroupHugePageLimitsConfig hugepageLimits
Definition: resources-config.hpp:66
CGroupMemoryConfig memory
Definition: resources-config.hpp:62
std::string type
value from those defined in http://man7.org/linux/man-pages/man2/setrlimit.2.html ...
Definition: resources-config.hpp:40
std::vector< HugePageLimit > CGroupHugePageLimitsConfig
Definition: cgroups-config.hpp:248
Definition: cgroups-config.hpp:189
Definition: resources-config.hpp:59
Definition: cgroups-config.hpp:127
CGroups configuration.
Definition: cgroups-config.hpp:36
#define CARGO_REGISTER(...)
Registers cargo fields within class.
Definition: fields.hpp:74
bool disableOOMKiller
Definition: resources-config.hpp:61
CGroupNetworkConfig network
Definition: resources-config.hpp:67
Definition: resources-config.hpp:35
Definition: cgroups-config.hpp:73