1\ingroup GroupModules Modules
2\defgroup GroupTrafficCop Traffic Cop
3
4Copyright (c) 2021, Arm Limited and Contributors. All rights reserved.
5
6# Traffic Cop
7
8## Overview
9Traffic Cop is a performance plugin module. It imposes limitations on
10performance according to the platform electric capabilities.
11
12The limitation can be configured based on the number of active cores for each
13domain. In this case, a domain could be a group of cores supplied by the same
14power rail. The configuration is a simple lookup table that maps the number of
15active cores and the maximum performance level allowed as shown here. This table
16is called the Performance Constraint Table or PCT.
17
18This PCT table is an example of 4 cores domain:
19
20| Number of cores online |   perf limit   |
21|          :---:         |      :---:     |
22|            4           |      2000      |
23|            3           |      2500      |
24|            2           |      3000      |
25
26
27## Configuration Example
28
29```config_traffic_cop.c```
30
31```C
32static struct mod_tcop_pct_table pct[] = {
33    { .cores_online = 4,
34      .perf_limit =  2000,
35    },
36    { .cores_online = 3,
37      .perf_limit =  2500,
38    },
39    { .cores_online = 2,
40      .perf_limit =  3000,
41    },
42    { 0 },
43};
44```
45
46NOTE: The table must be provided in descending order, starting with the highest
47number of cores allowed.
48