All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Ellerman <michael@ellerman.id.au>
To: Nathan Fontenot <nfont@austin.ibm.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] Display processor virtualization resource allocations in lparcfg
Date: Wed, 27 May 2009 11:14:22 +1000	[thread overview]
Message-ID: <1243386862.18971.41.camel@concordia> (raw)
In-Reply-To: <4A1C2E10.9020109@austin.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 1192 bytes --]

On Tue, 2009-05-26 at 12:59 -0500, Nathan Fontenot wrote:
> This patch updates the output from /proc/ppc64/lparcfg to display the
> processor virtualization resource allocations for a shared processor
> partition.

> @@ -267,6 +281,28 @@
>  	seq_printf(m, "capped=%d\n", ppp_data.capped);
>  	seq_printf(m, "unallocated_capacity=%lld\n",
>  		   ppp_data.unallocated_entitlement);
> +
> +	/* The last bits of information returned from h_get_ppp are only
> +	 * valid if the ibm,partition-performance-parameters-level
> +	 * property is >= 1.
> +	 */
> +	root = of_find_node_by_path("/");
> +	if (root) {
> +		perf_level = of_get_property(root,
> +				"ibm,partition-performance-parameters-level",
> +					     NULL);

What if there is no such property?

> +		if (*perf_level >= 1) {
> +			seq_printf(m,
> +			    "physical_procs_allocated_to_virtualization=%d\n",
> +				   ppp_data.phys_platform_procs);
> +			seq_printf(m, "max_proc_capacity_available=%d\n",
> +				   ppp_data.max_proc_cap_avail);
> +			seq_printf(m, "entitled_proc_capacity_available=%d\n",
> +				   ppp_data.entitled_proc_cap_avail);
> +		}
> +
> +		of_node_put(root);
> +	}

cheers

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

  reply	other threads:[~2009-05-27  1:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-26 17:59 [PATCH] Display processor virtualization resource allocations in lparcfg Nathan Fontenot
2009-05-27  1:14 ` Michael Ellerman [this message]
2009-05-27 14:30   ` Nathan Fontenot
2009-05-27 14:41 ` [PATCH] v2: " Nathan Fontenot
2009-05-28  0:31   ` Michael Ellerman

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=1243386862.18971.41.camel@concordia \
    --to=michael@ellerman.id.au \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=nfont@austin.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.