Intel Confidential Computing
Discussion board focused on Intel Confidential Computing technologies and how they can protect data and AI security, privacy, and sovereignty.
1558 Discussions

EPC allocation policy on multisocket machines - Intel(R) Xeon(R) Gold 6348 CPU @ 2.60GHz

boukhari
Beginner
2,678 Views

Hello,

I am writing an intel sgx application on a multisocket machine. I am running some benchmarks and I need to do numa aware allocation inside the enclave. Is there a way I can force the enclave to allocate EPC pages on a specific numa socket? If that's not possible, how can I check on which numa socket are the epc pages being allocated? Is there a default policy for allocation?

Cheers,

Yassine 

0 Kudos
1 Solution
Sahira_Intel
Moderator
2,621 Views

Hi,

If you are using Linux kernel 5.13 or newer with the SGX driver built in, it already has basic NUMA-aware allocation build in. This means that it will try to allocate all required EPC for a given enclave on a single CPU (so it won't span memory allocation across the sockets). You can read more about the patch here.


Sincerely,

Sahira


View solution in original post

0 Kudos
3 Replies
Sahira_Intel
Moderator
2,622 Views

Hi,

If you are using Linux kernel 5.13 or newer with the SGX driver built in, it already has basic NUMA-aware allocation build in. This means that it will try to allocate all required EPC for a given enclave on a single CPU (so it won't span memory allocation across the sockets). You can read more about the patch here.


Sincerely,

Sahira


0 Kudos
boukhari
Beginner
2,618 Views

Hi,

Is there a way to force the enclave to do cross numa allocation? I need this feature to do some benchmarking regarding the memory access latencies in case of cross numa memory access ?

0 Kudos
Sahira_Intel
Moderator
2,587 Views

Hi,

There is no out of box way to force the enclave to do cross numa allocation. You would need to modify the kernel driver in order to accomplish this.

 

Sincerely,

Sahira 

0 Kudos
Reply