From: Jarkko Sakkinen <jarkko@kernel.org>
To: Dave Hansen <dave.hansen@intel.com>
Cc: linux-sgx@vger.kernel.org,
Reinette Chatre <reinette.chatre@intel.com>,
Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
Jonathan Corbet <corbet@lwn.net>,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH RFC v3] x86/sgx: Add /proc/sys/kernel/sgx/total_mem
Date: Thu, 12 Aug 2021 22:53:01 +0300 [thread overview]
Message-ID: <20210812195301.jqnhvosfpqncl3jg@kernel.org> (raw)
In-Reply-To: <0c935066-008d-b023-7dc3-f4e0ac1b3d20@intel.com>
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
next prev parent reply other threads:[~2021-08-12 19:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-11 3:21 Jarkko Sakkinen
2021-08-11 14:30 ` Dave Hansen
2021-08-12 19:53 ` Jarkko Sakkinen [this message]
2021-08-12 20:04 ` Dave Hansen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210812195301.jqnhvosfpqncl3jg@kernel.org \
--to=jarkko@kernel.org \
--cc=bp@alien8.de \
--cc=corbet@lwn.net \
--cc=dave.hansen@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sgx@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=reinette.chatre@intel.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®