lkml.org 
[lkml]   [2021]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v9 2/2] x86/sgx: Add an attribute for the amount of SGX memory in a NUMA node
From
Date
On Fri, 2021-10-29 at 10:00 -0700, Dave Hansen wrote:
> On 10/29/21 5:18 AM, Jarkko Sakkinen wrote:
> > +What:          /sys/devices/system/node/nodeX/sgx/size
> > +Date:          October 2021
> > +Contact:       Jarkko Sakkinen <jarkko@kernel.org>
>
> I don't think we should do something *entirely* SGX-specific here.  The
> only question to me is whether any non-SGX users want something like
> this and who they are.
>
> Here are some ideas I like more than an "sgx/" directory:
>
>         /sys/devices/system/node/nodeX/arch/sgx_size
>         /sys/devices/system/node/nodeX/x86/sgx_size
>         /sys/devices/system/node/nodeX/coco/sgx_size

Sure, I can rename the attribute group as "x86".

> There's somebody else *today* who is trying to do something in the same
> general area: per-node platform-specific memory encryption capabilities:
>
> > https://lore.kernel.org/all/20211027195511.207552-6-martin.fernandez@eclypsium.com/

Martin's is adding a new attribute as part of pre-existing attribute group for
node device, where as my patch is adding a completely new named attribute
group.

> Also, could we please think through how this will look if we add more
> attributes?  I can imagine wanting both:
>
>         * total SGX memory available
>         * total SGX memory present
>
> But those would be quite hard to differentiate if we have just an
> "sgx_size".
>
> Wouldn't it be much nicer to name them things like:
>
>         sgx_present_bytes
>         sgx_available_bytes
>
> ?
>
> In other words, can we please try to think just a bit into the future on
> this one?  What other SGX things will we want to export like this?
> Outside of SGX, who else wants stuff _like_ this?

I don't mind renaming the attribute but maybe it should sgx_total_bytes, just
because in some other sysfs attributes that keyword is used to refer all of the
bytes?

/Jarkko

\
 
 \ /
  Last update: 2021-10-31 18:49    [W:0.062 / U:0.464 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site