Intel® Software Guard Extensions (Intel® SGX)
Discussion board focused on hardware-based isolation and memory encryption to provide extended code protection in solutions.
1485 Discussions

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

boukhari
Beginner
894 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
837 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
838 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
834 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
803 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