All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nicholas Piggin <npiggin@gmail.com>
To: Haren Myneni <haren@linux.ibm.com>,
	linuxppc-dev@lists.ozlabs.org, mpe@ellerman.id.au,
	nathanl@linux.ibm.com
Subject: Re: [PATCH v4 9/9] powerpc/pseries/vas: Write 'nr_total_credits' for QoS credits change
Date: Wed, 23 Feb 2022 17:33:40 +1000	[thread overview]
Message-ID: <1645601513.45xu2b6rs6.astroid@bobo.none> (raw)
In-Reply-To: <790aac27437fdd13b6e1dac36682b123f9050b04.camel@linux.ibm.com>

Excerpts from Haren Myneni's message of February 20, 2022 6:03 am:
> 
> pseries supports two types of credits - Default (uses normal priority
> FIFO) and Qality of service (QoS uses high priority FIFO). The user
> decides the number of QoS credits and sets this value with HMC
> interface. With the core add/removal, this value can be changed in HMC
> which invokes drmgr to communicate to the kernel.
> 
> This patch adds an interface so that drmgr command can write the new
> target QoS credits in sysfs. But the kernel gets the new QoS
> capabilities from the hypervisor whenever nr_total_credits is updated
> to make sure sync with the values in the hypervisor.
> 
> Signed-off-by: Haren Myneni <haren@linux.ibm.com>
> ---
>  arch/powerpc/platforms/pseries/vas-sysfs.c | 33 +++++++++++++++++++++-
>  arch/powerpc/platforms/pseries/vas.c       |  2 +-
>  arch/powerpc/platforms/pseries/vas.h       |  1 +
>  3 files changed, 34 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/powerpc/platforms/pseries/vas-sysfs.c b/arch/powerpc/platforms/pseries/vas-sysfs.c
> index e24d3edb3021..20745cd75f27 100644
> --- a/arch/powerpc/platforms/pseries/vas-sysfs.c
> +++ b/arch/powerpc/platforms/pseries/vas-sysfs.c
> @@ -25,6 +25,33 @@ struct vas_caps_entry {
>  
>  #define to_caps_entry(entry) container_of(entry, struct vas_caps_entry, kobj)
>  
> +/*
> + * This function is used to get the notification from the drmgr when
> + * QoS credits are changed. Though receiving the target total QoS
> + * credits here, get the official QoS capabilities from the hypervisor.
> + */
> +static ssize_t nr_total_credits_store(struct vas_cop_feat_caps *caps,
> +				       const char *buf, size_t count)
> +{
> +	int err;
> +	u16 creds;
> +
> +	/*
> +	 * Nothing to do for default credit type.
> +	 */
> +	if (caps->win_type == VAS_GZIP_DEF_FEAT_TYPE)
> +		return -EOPNOTSUPP;
> +
> +	err = kstrtou16(buf, 0, &creds);
> +	if (!err)
> +		err = vas_reconfig_capabilties(caps->win_type);

So what's happening here? The creds value is ignored? Can it just
be a write-only file which is named appropriately to indicate it
can be written-to to trigger an update?

Thanks,
Nick

  reply	other threads:[~2022-02-23  7:34 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-19 19:49 [PATCH v4 0/9] powerpc/pseries/vas: NXGZIP support with DLPAR Haren Myneni
2022-02-19 19:54 ` [PATCH v4 1/9] powerpc/pseries/vas: Use common names in VAS capability structure Haren Myneni
2022-02-19 19:55 ` [PATCH v4 2/9] powerpc/pseries/vas: Save PID in pseries_vas_window struct Haren Myneni
2022-02-23  7:00   ` Nicholas Piggin
2022-02-19 19:55 ` [PATCH v4 3/9] powerpc/vas: Add paste address mmap fault handler Haren Myneni
2022-02-23  7:03   ` Nicholas Piggin
2022-02-19 19:58 ` [PATCH v4 4/9] powerpc/vas: Return paste instruction failure if no active window Haren Myneni
2022-02-23  7:05   ` Nicholas Piggin
2022-02-23  7:56     ` Haren Myneni
2022-02-19 19:59 ` [PATCH v4 5/9] powerpc/vas: Map paste address only if window is active Haren Myneni
2022-02-23  7:11   ` Nicholas Piggin
2022-02-23  8:02     ` Haren Myneni
2022-02-19 20:00 ` [PATCH v4 6/9] powerpc/pseries/vas: Close windows with DLPAR core removal Haren Myneni
2022-02-23  7:23   ` Nicholas Piggin
2022-02-23  8:21     ` Haren Myneni
2022-02-19 20:01 ` [PATCH v4 7/9] powerpc/pseries/vas: Reopen windows with DLPAR core add Haren Myneni
2022-02-23  7:28   ` Nicholas Piggin
2022-02-23  8:32     ` Haren Myneni
2022-02-19 20:01 ` [PATCH v4 8/9] powerpc/pseries/vas: sysfs interface to export capabilities Haren Myneni
2022-02-23  7:29   ` Nicholas Piggin
2022-02-19 20:03 ` [PATCH v4 9/9] powerpc/pseries/vas: Write 'nr_total_credits' for QoS credits change Haren Myneni
2022-02-23  7:33   ` Nicholas Piggin [this message]
2022-02-23  8:39     ` Haren Myneni

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=1645601513.45xu2b6rs6.astroid@bobo.none \
    --to=npiggin@gmail.com \
    --cc=haren@linux.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=nathanl@linux.ibm.com \
    /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.