3 /* Copyright (c) 2020, Samsung Electronics Co., Ltd. All rights reserved.
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License. */
23 struct metrics_pid_aggr_info {
30 typedef void (*qos_distribution_func)(struct qos_module *qos, struct metrics_pid_aggr_info *infos, int count);
33 qos_distribution_func distribution_func;
34 struct metrics *log_metrics;
38 int threshold_reapply;
40 struct timespec cancel_limits_at;
41 bool currently_limiting;
44 qos_distribution_func qos_get_distribution_func_by_name(const char *name);
46 bool qos_is_enabled(const struct qos_module *qos);
47 void qos_create_limits_file(struct qos_module *qos, bool is_limiting);
48 void qos_set_next_update_time(struct qos_module *qos, struct timespec now);
49 void qos_apply_limits(struct qos_module *qos);
50 void qos_relax_limits(struct qos_module *qos);
51 void qos_add_log(struct qos_module *qos, const struct dlogutil_entry *due);
52 void qos_free(struct qos_module *qos);