From mboxrd@z Thu Jan 1 00:00:00 1970 From: Don Slutz Subject: Re: [PATCH v2 02/12] xenctx: Add -2 (--two-pages) option to switch stack size to 8KiB Date: Thu, 7 Nov 2013 10:24:54 -0500 Message-ID: <527BB0C6.3070208@terremark.com> References: <1383768500-4245-1-git-send-email-dslutz@terremark.com> <1383768500-4245-3-git-send-email-dslutz@terremark.com> <527B57AE0200007800100779@nat28.tlf.novell.com> <1383828014.32399.22.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VeRVc-0007hp-PO for xen-devel@lists.xenproject.org; Thu, 07 Nov 2013 15:28:37 +0000 In-Reply-To: <1383828014.32399.22.camel@kazak.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: Stefano Stabellini , George Dunlap , Don Slutz , Ian Jackson , Don Slutz , Jan Beulich , xen-devel List-Id: xen-devel@lists.xenproject.org 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 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. >