linux内核的挂载,通过Linux内核使用RDT

66b52468c121889b900d4956032f1009.png

8种机械键盘轴体对比

本人程序员,要买一个写代码的键盘,请问红轴和茶轴怎么选?

Intel RDT特性详解介绍了RDT的基本概念,以及通过PQOS工具使用RDT。本文主要是介绍如何通过内核来使用RDT。

我的内核版本为4.14.32,内核对RDT的支持有版本要求,详情请参考OS interface feature support。cpu型号为Intel Xeon E5 2650 v4,共两个cpu。

内核编译

RDT技术的选项位于“processor type and feature” -> “Intel Resource Director Technology Allocation support”。

5ddde59a0b82c.png

5ddde59b3a481.png

挂载文件系统

mount -t resctrl resctrl /sys/fs/resctrl

Resource alloc and monitor groups

Resource groupsCTRL_MON groups

Resource groups are represented as directories in the resctrl file system. The default group is the root directory which, immediately after mounting, owns all the tasks and cpus in the system and can make full use of all resources.

On a system with RDT control features additional directories can be created in the root directory that specify different amounts of each resource. The root and these additional top level directories are referred to as “CTRL_MON” groups.MON groups

On a system with RDT monitoring the root directory and other top level directories contain a directory named “mon_groups” in which additional directories can be created to monitor subsets of tasks in the CTRL_MON group that is their ancestor. These are called “MON” groups.

All groups contain the following filestasks

Reading this file shows the list of all tasks that belong to this group. Writing a task id to the file will add a task to the group.

cpus

是一个16进制整数,每一个bit代表一个CPU核心,比如我这里有10个“f”,意味着该机器有40个core。

When control is enabled

When control is enabled all CTRL_MON groups will also contain:schemata

策略表,每个策略一行,格式为:

L3: cache_id0 = cbm; cache_id1 = cbm

这里的cache id可以理解为CPU id,而后面的cbm是分配给cpu的L3单元数量。我这块CPU每个socket会有11个L3 cache 单元也就是7ff。就是指在cpu cache的每个组内,group可以使用的cache line的数量。

When monitoring is enabled

When monitoring is enabled all MON groups will also contain:mon_data

This contains a set of files organized by L3 domain and by RDT event. E.g. on a system with two L3 domains there will be subdirectories “mon_L3_00” and “mon_L3_01”. Each of these directories have one file per event (e.g. “llc_occupancy”, “mbm_total_bytes”, and “mbm_local_bytes”). In a MON group these files provide a read out of the current value of the event for all tasks in the group(在MON组中,这些文件为组中的所有任务提供读取当前事件的值).

Examples for RDT allocation usage

Examples for RDT Monitoring along with allocation usage

参考资料:

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值