Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:12.2:PowerPC
xen
23128-xentrace_correct_formula_to_calculate_t_i...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 23128-xentrace_correct_formula_to_calculate_t_info_pages.patch of Package xen
changeset: 23128:4a335f1000ea user: Olaf Hering <olaf@aepfle.de> date: Sat Apr 02 15:50:19 2011 +0100 files: xen/common/trace.c description: xentrace: correct formula to calculate t_info_pages The current formula to calculate t_info_pages, based on the initial code, is slightly incorrect. It may allocate more than needed. Each cpu has some pages/mfns stored as uint32_t. That list is stored with an offset at tinfo. Signed-off-by: Olaf Hering <olaf@aepfle.de> Acked-by: George Dunlap <george.dunlap@eu.citrix.com> --- xen/common/trace.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) Index: xen-4.1.2-testing/xen/common/trace.c =================================================================== --- xen-4.1.2-testing.orig/xen/common/trace.c +++ xen-4.1.2-testing/xen/common/trace.c @@ -110,7 +110,7 @@ static int calculate_tbuf_size(unsigned { struct t_buf dummy; typeof(dummy.prod) size; - unsigned int t_info_words, t_info_bytes; + unsigned int t_info_words; /* force maximum value for an unsigned type */ size = -1; @@ -125,9 +125,8 @@ static int calculate_tbuf_size(unsigned pages = size; } - t_info_words = num_online_cpus() * pages + t_info_first_offset; - t_info_bytes = t_info_words * sizeof(uint32_t); - t_info_pages = PFN_UP(t_info_bytes); + t_info_words = num_online_cpus() * pages * sizeof(uint32_t); + t_info_pages = PFN_UP(t_info_first_offset + t_info_words); printk(XENLOG_INFO "xentrace: requesting %u t_info pages " "for %u trace pages on %u cpus\n", t_info_pages, pages, num_online_cpus());
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor