intel / intel-cmt-cat

User space software for Intel(R) Resource Director Technology
http://www.intel.com/content/www/us/en/architecture-and-technology/resource-director-technology.html
Other
693 stars 183 forks source link

Pseudo locking on skylake processors. #215

Closed variantf closed 2 years ago

variantf commented 2 years ago

Hi. I don't if here is the correct place to ask:

I'm interesting in kernel supported pseudo locking based on Intel RDT technology. My cpu is Xeon 6348 and it should have pseudo locking supported by kernel after 4.19.

However, when I do echo pseudo-locksetup > /sys/fs/resctrl/COS1/mode. it failed and /sys/fs/resctrl/info/last_cmd_status show 'Pseudo-locking not supported'

When I look into source code of linux kernel, looks like kernel only support CPU on BROADWELL cpus. no any sucessor. (https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/x86/kernel/cpu/resctrl/pseudo_lock.c#n71)

Is there any way that I can use pseudo-locking on my server?

Thank you in advance!

tkanteck commented 2 years ago

Hello, thanks for reaching out. The short answer is no. There is no way to use pseudo-lock in architectures later than Broadwell. This is due to changes in caching architecture. Thanks, Tomasz

variantf commented 2 years ago

@tkanteck Thank you for the response. I also found there's demo code for pseudo-locking based on CAT. any difference between kernel support pseudo-locking vs CAT based one? looks like I can also allocate a shared memory area with shmget, and pin the area to a dedicated cache association way and map the memory area to multiple process.

tkanteck commented 2 years ago

Hello @variantf , I would expect kernel code to be more reliable as to the locking process - it has better hardware control in ring 0 (vs user space). Yes, your idea with allocating and pseudo locking shared memory should work on Broadwell.

variantf commented 2 years ago

@tkanteck Does this mean that there's no way for pseudo locking working on later processors like Cascadelake? Or we can't do pseudo locking on shared-memory but can do on private memory after Broadwell?

in other word, does Cache Allocation Technology still take effect after Broadwell microarchitecture?

tkanteck commented 2 years ago

CAT is supported beyond Broadwell. Please have a look into this errata for details Intel® RDT errata on 2nd generation Intel® Xeon® Scalable processors with lab data

Pseudo locking is not going to work on platforms beyond Broadwell due to change in cache architecture.