All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jarkko Sakkinen <jarkko@kernel.org>
To: Dave Hansen <dave.hansen@intel.com>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>
Cc: reinette.chatre@intel.com, tony.luck@intel.com,
	linux-kernel@vger.kernel.org, linux-sgx@vger.kernel.org
Subject: Re: [PATCH v9 2/2] x86/sgx: Add an attribute for the amount of SGX memory in a NUMA node
Date: Sun, 31 Oct 2021 19:49:21 +0200	[thread overview]
Message-ID: <4e5cdd5825018778ad15abed33242703b8066e76.camel@kernel.org> (raw)
In-Reply-To: <3ffafe28-e770-a285-98d0-1379271ba36d@intel.com>

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


  reply	other threads:[~2021-10-31 17:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-29 12:18 [PATCH v9 1/2] x86/sgx: Rename fallback labels in sgx_init() Jarkko Sakkinen
2021-10-29 12:18 ` [PATCH v9 2/2] x86/sgx: Add an attribute for the amount of SGX memory in a NUMA node Jarkko Sakkinen
2021-10-29 14:53   ` Greg Kroah-Hartman
2021-10-31 17:39     ` Jarkko Sakkinen
2021-10-31 19:30       ` Greg Kroah-Hartman
2021-10-31 23:52         ` Jarkko Sakkinen
2021-10-29 17:00   ` Dave Hansen
2021-10-31 17:49     ` Jarkko Sakkinen [this message]
2021-11-01  0:01       ` Jarkko Sakkinen

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=4e5cdd5825018778ad15abed33242703b8066e76.camel@kernel.org \
    --to=jarkko@kernel.org \
    --cc=bp@alien8.de \
    --cc=dave.hansen@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sgx@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rafael@kernel.org \
    --cc=reinette.chatre@intel.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.