qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Igor Mammedov <imammedo@redhat.com>
To: Niek Linnenbank <nieklinnenbank@gmail.com>
Cc: "Richard Henderson" <richard.henderson@linaro.org>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"Laurent Vivier" <laurent@vivier.eu>,
	qemu-arm <qemu-arm@nongnu.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>
Subject: Re: [PATCH v1 4/4] accel/tcg: increase default code gen buffer size for 64 bit
Date: Fri, 28 Feb 2020 08:47:29 +0100	[thread overview]
Message-ID: <20200228084729.3bb8bf11@redhat.com> (raw)
In-Reply-To: <CAPan3WrSRm986EfwJdXV2MduNLE5BS+QmCv0Bo5-BD+QfT-=dg@mail.gmail.com>

On Thu, 27 Feb 2020 20:07:24 +0100
Niek Linnenbank <nieklinnenbank@gmail.com> wrote:

> Hi Richard,
> 
> On Thu, Feb 27, 2020 at 1:57 PM Richard Henderson <
> richard.henderson@linaro.org> wrote:  
> 
> > On 2/27/20 4:31 AM, Alex Bennée wrote:  
> > >> It does not make sense for a linux-user chroot, running make -jN, on  
> > just about  
> > >> any host.  For linux-user, I could be happy with a modest increase, but  
> > not all  
> > >> the way out to 2GiB.
> > >>
> > >> Discuss.  
> > >
> > > Does it matter that much? Surely for small programs the kernel just
> > > never pages in the used portions of the mmap?  
> >
> > That's why I used the example of a build under the chroot, because the
> > compiler
> > is not a small program.
> >
> > Consider when the memory *is* used, and N * 2GB implies lots of paging,
> > where
> > the previous N * 32MB did not.
> >
> > I agree that a lower default value probably is safer until we have more  
> proof that a larger value does not give any issues.
> 
> 
> > I'm saying that we should consider a setting more like 128MB or so, since
> > the
> > value cannot be changed from the command-line, or through the environment.
> >  
> 
> Proposal: can we then introduce a new command line parameter for this?
> Maybe in a new patch?

linux-user currently uses 32Mb static buffer so it probably fine to
leave it as is or bump it to 128Mb regardless of the 32/64bit host.

for system emulation, we already have tb-size option to set user
specified buffer size.

Issue is with system emulation is that it sizes buffer to 1/4 of
ram_size and dependency on ram_size is what we are trying to get
rid of. If we consider unit/acceptance tests as main target/user,
then they mostly use default ram_size value which varies mostly
from 16Mb to 1Gb depending on the board. So used buffer size is
in 4-256Mb range.
Considering that current CI runs fine with max 256Mb buffer,
it might make sense to use it as new heuristic which would not
regress our test infrastructure and might improve performance
for boards where smaller default buffer was used.


> Since the size of the code generation buffer appears to have an impact on
> performance,
> in my opinion it would make sense to make it configurable by the user.
> 
> Regards,
> 
> 
> >
> >
> > r~
> >
> >  
> 



  reply	other threads:[~2020-02-28  7:48 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-26 18:10 [PATCH v1 0/4] Fix codegen translation cache size Alex Bennée
2020-02-26 18:10 ` [PATCH v1 1/4] accel/tcg: use units.h for defining code gen buffer sizes Alex Bennée
2020-02-26 22:00   ` Niek Linnenbank
2020-02-26 22:49   ` Richard Henderson
2020-02-27 10:54   ` Philippe Mathieu-Daudé
2020-02-26 18:10 ` [PATCH v1 2/4] accel/tcg: remove link between guest ram and TCG cache size Alex Bennée
2020-02-26 22:26   ` Niek Linnenbank
2020-02-26 22:50     ` Richard Henderson
2020-02-26 22:49   ` Richard Henderson
2020-02-27 10:58   ` Philippe Mathieu-Daudé
2020-02-26 18:10 ` [PATCH v1 3/4] accel/tcg: only USE_STATIC_CODE_GEN_BUFFER on 32 bit hosts Alex Bennée
2020-02-26 22:50   ` Richard Henderson
2020-02-27 10:55   ` Philippe Mathieu-Daudé
2020-02-27 19:20   ` Niek Linnenbank
2020-02-26 18:10 ` [PATCH v1 4/4] accel/tcg: increase default code gen buffer size for 64 bit Alex Bennée
2020-02-26 22:45   ` Niek Linnenbank
2020-02-27 12:19     ` Alex Bennée
2020-02-27 19:01       ` Niek Linnenbank
2020-02-26 22:55   ` Richard Henderson
2020-02-27 12:31     ` Alex Bennée
2020-02-27 12:56       ` Richard Henderson
2020-02-27 14:13         ` Igor Mammedov
2020-02-27 19:07         ` Niek Linnenbank
2020-02-28  7:47           ` Igor Mammedov [this message]
2020-02-28 19:20             ` Alex Bennée
2020-02-28  7:54         ` [PATCH] " Alex Bennée

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200228084729.3bb8bf11@redhat.com \
    --to=imammedo@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=laurent@vivier.eu \
    --cc=nieklinnenbank@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).