From: "Arnd Bergmann" <arnd@arndb.de>
To: "Alexander Graf" <graf@amazon.com>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Jonathan Corbet" <corbet@lwn.net>
Cc: "The AWS Nitro Enclaves Team"
<aws-nitro-enclaves-devel@amazon.com>,
"Shuah Khan" <skhan@linuxfoundation.org>,
linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
mancio@amazon.com, diapop@amazon.com, mknaust@amazon.com
Subject: Re: [PATCH 6/8] nitro_enclaves: Expose CPU pool state under sysfs
Date: Thu, 30 Jul 2026 17:28:08 +0200 [thread overview]
Message-ID: <a45fa55f-5637-4d63-95b8-948cea922c14@app.fastmail.com> (raw)
In-Reply-To: <20260730125312.71415-7-graf@amazon.com>
On Thu, Jul 30, 2026, at 14:53, Alexander Graf wrote:
> +static ssize_t total_show(struct device *dev, struct device_attribute *attr,
> + char *buf)
> +{
> + ssize_t ret;
> +
> + mutex_lock(&ne_cpu_pool.mutex);
> + ret = sysfs_emit(buf, "%*pbl\n", cpumask_pr_args(&ne_cpu_pool.pool_cpus));
> + mutex_unlock(&ne_cpu_pool.mutex);
> +
> + return ret;
> +}
> +static DEVICE_ATTR_RO(total);
> +
> +static ssize_t used_show(struct device *dev, struct device_attribute *attr,
> + char *buf)
> +{
> + ssize_t ret;
> +
> + mutex_lock(&ne_cpu_pool.mutex);
> + ret = sysfs_emit(buf, "%*pbl\n", cpumask_pr_args(&ne_cpu_pool.claimed_cpus));
> + mutex_unlock(&ne_cpu_pool.mutex);
> +
> + return ret;
> +}
> +static DEVICE_ATTR_RO(used);
The names are a bit inconsistent: you have pool/claimed for the internal
structure but total/used for the ABI. It might help to pick one set of
names here.
Arnd
next prev parent reply other threads:[~2026-07-30 15:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-30 12:53 [PATCH 0/8] nitro_enclaves: Support multi-NUMA CPU pools and per-node allocation Alexander Graf
2026-07-30 12:53 ` [PATCH 1/8] nitro_enclaves: Let 32-bit processes use the ioctl interface Alexander Graf
2026-07-30 12:53 ` [PATCH 2/8] nitro_enclaves: Initialise the CPU pool mutex statically Alexander Graf
2026-07-30 12:53 ` [PATCH 3/8] nitro_enclaves: Slot pool cores by sibling mask Alexander Graf
2026-07-30 12:53 ` [PATCH 4/8] nitro_enclaves: Allow the CPU pool to span NUMA nodes Alexander Graf
2026-07-30 12:53 ` [PATCH 5/8] nitro_enclaves: Add NE_SET_ALLOC_NUMA_NODE Alexander Graf
2026-07-30 15:28 ` Arnd Bergmann
2026-07-30 12:53 ` [PATCH 6/8] nitro_enclaves: Expose CPU pool state under sysfs Alexander Graf
2026-07-30 15:28 ` Arnd Bergmann [this message]
2026-07-30 12:53 ` [PATCH 7/8] Documentation: ABI: Describe nitro_enclaves cpu_pool sysfs Alexander Graf
2026-07-30 12:53 ` [PATCH 8/8] Documentation: virt: Describe multi-NUMA Nitro Enclaves CPU pools Alexander Graf
2026-07-30 15:43 ` [PATCH 0/8] nitro_enclaves: Support multi-NUMA CPU pools and per-node allocation Arnd Bergmann
2026-07-30 16:35 ` Graf (AWS), Alexander
2026-07-31 8:26 ` Arnd Bergmann
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=a45fa55f-5637-4d63-95b8-948cea922c14@app.fastmail.com \
--to=arnd@arndb.de \
--cc=aws-nitro-enclaves-devel@amazon.com \
--cc=corbet@lwn.net \
--cc=diapop@amazon.com \
--cc=graf@amazon.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mancio@amazon.com \
--cc=mknaust@amazon.com \
--cc=skhan@linuxfoundation.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®