[PATCH] Display processor virtualization resource allocations in lparcfg

Nathan Fontenot nfont at austin.ibm.com
Thu May 28 00:30:46 EST 2009


Michael Ellerman wrote:
>> +	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?

Yes, that would cause this code to do some bad things.  Updated patch on its way.

> 
>> +		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

-Nathan



More information about the Linuxppc-dev mailing list