Skip to contentSkip to conversation

balloon: don't talk about low/high memory when there is no such distinction

PATCH In review Jan Beulich 4 participants 5 messages Jun 23, 2006 – Jun 27, 2006 Xen hypervisor interface

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 balloon: don't talk about low/high memory when there is no such distinction

.. in order to not confuse people.

drivers/xen/balloon/balloon.c +9 -3
Index: head-2006-06-13/drivers/xen/balloon/balloon.c
===================================================================
@@ -492,11 +492,20 @@ static int balloon_read(char *page, char
 		page,
 		"Current allocation: %8lu kB\n"
 		"Requested target:   %8lu kB\n"
+#ifdef CONFIG_HIGHMEM
 		"Low-mem balloon:    %8lu kB\n"
 		"High-mem balloon:   %8lu kB\n"
+#else
+		"Balloon:            %8lu kB\n"
+#endif
 		"Xen hard limit:     ",
 		PAGES2KB(current_pages), PAGES2KB(target_pages), 
+#ifdef CONFIG_HIGHMEM
 		PAGES2KB(balloon_low), PAGES2KB(balloon_high));
+#else
+		PAGES2KB(balloon_low));
+	WARN_ON(balloon_high);
+#endif
 
 	if (hard_limit != ~0UL) {
 		len += sprintf(
@@ -528,9 +537,6 @@ static int __init balloon_init(void)
 	current_pages = min(xen_start_info->nr_pages, max_pfn);
 	totalram_pages = current_pages;
 	target_pages  = current_pages;
-	balloon_low   = 0;
-	balloon_high  = 0;
-	driver_pages  = 0UL;
 	hard_limit    = ~0UL;
 
 	init_timer(&balloon_timer);

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw
Quoted 1 line · Jan Beulich

.. in order to not confuse people.

Hi Jan,

This will confuse any tool that parses the output of the file though. The ifdefs are also pretty ugly... is the current output so confusing?

Cheers,
Muli

#2 lore raw
Quoted 12 lines · Muli Ben-Yehuda
Quoted 2 lines · Jan Beulich

.. in order to not confuse people.

Hi Jan,

This will confuse any tool that parses the output of the file though. The ifdefs are also pretty ugly... is the current output so confusing?

Xend actually relies on the output of /proc/xen/balloon. See tools/python/xen/xend/balloon.py

Regards,

Anthony Liguori

Quoted 8 lines

Cheers,
Muli

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#3 lore raw
In reply to Muli Ben-Yehuda
Quoted 8 lines
Quoted 1 line
Quoted 1 line

Muli Ben-Yehuda <[email protected]> 24.06.06 16:51 >>>

Quoted 1 line · Jan Beulich

.. in order to not confuse people.

This will confuse any tool that parses the output of the file though. The ifdefs are also pretty ugly... is the current output so confusing?

I did get confused - I imagined 'high' and 'low' to be something entirely different until I looked at the code in greater detail.

I generally consider tools depending on spelling or other similar things broken. But of course, this is a personal opinion perhaps based on my non-Unix/Linux origin.

Jan

#4 lore raw
In reply to Jan Beulich
Quoted 3 lines · Jan Beulich

.. in order to not confuse people.

Changing the output format across architectures isn't very nice for scripts which may scrape the output. There's also precedent (/proc/meminfo includes redundant high/low distinction even on architectures where it makes no sense).

-- Keir