From mboxrd@z Thu Jan 1 00:00:00 1970 From: Grant Likely Subject: Re: [Qemu-devel] [RFC PATCH 1/7] devicetree: Add 8k instead of double dtb size when reserving extra memory Date: Fri, 9 Apr 2010 08:55:56 -0600 Message-ID: References: <20100407040129.20274.44284.stgit@angua> <20100407041002.20274.51604.stgit@angua> <201004091300.57740.paul@codesourcery.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <201004091300.57740.paul-qD8j1LwMmJjtCj0u4l0SBw@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org To: Paul Brook Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org, qemu-devel-qX2TKyscuCcdnm+yROfE0A@public.gmane.org, jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org List-Id: devicetree@vger.kernel.org On Fri, Apr 9, 2010 at 6:00 AM, Paul Brook wrote: >> If a small 'seed' dtb file is loaded into qemu and then heavily modified >> (say for runtime population of all the device nodes), then 2x the dtb >> size turns out not to be very much. >> >> This patch changes the device tree loading code to add a fixed 8k of >> additional space to the dtb buffer. > > In that case you almost certainly want double+8k. Or have the calleee tell you > how much they're expecting to grow the tree. Good point. I think I like the latter option. g. -- Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd. From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O0Fik-0004uc-SK for qemu-devel@nongnu.org; Fri, 09 Apr 2010 11:02:10 -0400 Received: from [140.186.70.92] (port=49820 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O0Fii-0004tW-Q2 for qemu-devel@nongnu.org; Fri, 09 Apr 2010 11:02:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O0Fig-00056M-N6 for qemu-devel@nongnu.org; Fri, 09 Apr 2010 11:02:08 -0400 Received: from mail-pw0-f45.google.com ([209.85.160.45]:34695) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O0Fig-000568-IX for qemu-devel@nongnu.org; Fri, 09 Apr 2010 11:02:06 -0400 Received: by pwi6 with SMTP id 6so2740866pwi.4 for ; Fri, 09 Apr 2010 08:02:05 -0700 (PDT) MIME-Version: 1.0 Sender: glikely@secretlab.ca In-Reply-To: <201004091300.57740.paul@codesourcery.com> References: <20100407040129.20274.44284.stgit@angua> <20100407041002.20274.51604.stgit@angua> <201004091300.57740.paul@codesourcery.com> From: Grant Likely Date: Fri, 9 Apr 2010 08:55:56 -0600 Message-ID: Subject: Re: [Qemu-devel] [RFC PATCH 1/7] devicetree: Add 8k instead of double dtb size when reserving extra memory Content-Type: text/plain; charset=ISO-8859-1 List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: devicetree-discuss@lists.ozlabs.org, qemu-devel@nongnu.org, jeremy.kerr@canonical.com On Fri, Apr 9, 2010 at 6:00 AM, Paul Brook wrote: >> If a small 'seed' dtb file is loaded into qemu and then heavily modified >> (say for runtime population of all the device nodes), then 2x the dtb >> size turns out not to be very much. >> >> This patch changes the device tree loading code to add a fixed 8k of >> additional space to the dtb buffer. > > In that case you almost certainly want double+8k. Or have the calleee tell you > how much they're expecting to grow the tree. Good point. I think I like the latter option. g. -- Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd.