lkml.org 
[lkml]   [2021]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC v3] x86/sgx: Add /proc/sys/kernel/sgx/total_mem
On Wed, Aug 11, 2021 at 07:30:13AM -0700, Dave Hansen wrote:
> On 8/10/21 8:21 PM, Jarkko Sakkinen wrote:
> > +The following sysctl files can be found in the ``/proc/sys/kernel/sgx/`` directory:
> > +
> > +``total_mem``
> > + The total amount of SGX protected memory in bytes available in the system
> > + available for use. In other words, it describes the size of the Enclave
> > + Page Cache (EPC).
>
> I've been acting as if /proc is deprecated for new stuff. Shouldn't
> this be going in sysfs?

Are sysctl variables deprecated too?

> I figured, at some point, someone is going to ask for NUMA statistics.
> That would tend to point in the direction of us needing something in:
>
> /sys/devices/system/node/nodeN/
>
> Maybe 'sgxinfo' or 'sgxstat' to go along with 'meminfo'.

Is conetents of meminfo freezed or can a new line added, e.g.

Node 0 SgxMemTotal: 32825700 kB

If a new file is needed, I would name it as "sgxmeminfo"

> But, we'll probably also end up needing some stats for other things.
> Folks have, for instance, asked for a counter of the number of
> instantiated enclaves.
>
> We could also use the drivers' namespaces:
>
> /sys/class/misc/sgx_enclave
> /sys/class/misc/sgx_provision
> /sys/class/misc/sgx_vepc
>
> although that is a bit awkward for reporting global resources like memory.

I think these stats should be available when the driver is not enabled.

It would be best to find a global solution for the long-run.

/Jarkko

\
 
 \ /
  Last update: 2021-08-12 21:54    [W:0.063 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site