[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 02/12] xenctx: Add -2 (--two-pages) option to switch stack size to 8KiB



On 11/07/13 07:40, Ian Campbell wrote:
On Thu, 2013-11-07 at 08:04 +0000, Jan Beulich wrote:
On 06.11.13 at 21:08, Don Slutz <dslutz@xxxxxxxxxxx> wrote:
@@ -650,9 +651,11 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int 
vcpu, int width)
stack_limit = ((stack_pointer(ctx) + XC_PAGE_SIZE)
                     & ~((guest_word_t) XC_PAGE_SIZE - 1));
+    if (xenctx.two_pages)
+        stack_limit += XC_PAGE_SIZE;
      printf("\n");
      printf("Stack:\n");
-    for (i=1; i<5 && stack < stack_limit; i++) {
+    for (i=1; i<10 && stack < stack_limit; i++) {
Touching a malformed line like this makes it almost mandatory imo
to fix the coding style (missing blanks around = and <).
Will do.

Apart from that, the change isn't really related to the subject of
the patch afaict, and as you're making thing more flexible anyway,
it would seem reasonable to also have a command line option to
control this limit.
Part 1 is. Part 2 ("i<5" to "i<10") is not, it is part of patch #3 (and should have been there) to keep the amount output the same. A new option does make sense; will add it.
Or derive it from stack_limit and/or the number of pages?
Not sure this is better then a new option. stack_limit currently reduces the amount of output.
What about kernels which use 4 pages for their stack ;-)
Patch #8 would allow you to do this, 2 pages at a time. (or could also add -4...)
   -Don Slutz

Ian.



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.