[PATCH] Display processor virtualization resource allocations in lparcfg

Michael Ellerman michael at ellerman.id.au
Wed May 27 11:14:22 EST 2009


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20090527/b8697d76/attachment.pgp>


More information about the Linuxppc-dev mailing list