public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Andreas Herrmann <andreas.herrmann@caviumnetworks.com>
To: Will Deacon <will.deacon@arm.com>
Cc: "kvm@vger.kernel.org" <kvm@vger.kernel.org>
Subject: Re: [PATCH] kvmtool: Add parameter to specifiy number of threads in thread_pool
Date: Mon, 29 Jun 2015 12:14:02 +0200	[thread overview]
Message-ID: <20150629101402.GA3379@alberich> (raw)
In-Reply-To: <20150629094502.GA17474@arm.com>

On Mon, Jun 29, 2015 at 10:45:03AM +0100, Will Deacon wrote:
> On Mon, Jun 29, 2015 at 08:45:44AM +0100, Andreas Herrmann wrote:
> > 
> > With current code the number of threads added to the thread_pool
> > equals number of online CPUs. Thus on an OcteonIII cn78xx system we
> > usually have 48 threads per guest just for the thread_pool. IMHO this
> > is overkill for guests that just have a few vCPUs and/or if a guest is
> > pinned to a subset of host CPUs. E.g.
> > 
> >  # numactl -C 4,5,7,8 ./lkvm run -c 2 -m 256 -k paravirt -d rootfs.ext3 ...
> >  # ps -La | grep threadpool-work | wc -l
> >  48
> > 
> > Don't change default behaviour (for sake of compatibility) but
> > introduce a new parameter ("-t" or "--threads") that allows to specify
> > number of threads to be created for the thread_pool:
> > 
> >  # numactl -C 4,5,7,8 ./lkvm run -c 2 -m 256 --threads 4 -k paravirt -d ...
> >  # ps -La | grep threadpool-work | wc -l
> >  4
> 
> We should probably bound this on some minimum value. I assume things go
> pear-shaped if you pass --threads 1 (or 0, or -1)?

Ouch, yes, range must be checked (esp. for -1).

I think the passed value should be in [1, number of online CPUs].


Andreas


  reply	other threads:[~2015-06-29 10:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-29  7:45 [PATCH] kvmtool: Add parameter to specifiy number of threads in thread_pool Andreas Herrmann
2015-06-29  9:45 ` Will Deacon
2015-06-29 10:14   ` Andreas Herrmann [this message]
2015-06-29 11:43   ` [PATCH v2] " Andreas Herrmann
2015-06-30 14:03     ` Will Deacon
  -- strict thread matches above, loose matches on Subject: below --
2015-01-06 13:13 [PATCH] " Andreas Herrmann

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=20150629101402.GA3379@alberich \
    --to=andreas.herrmann@caviumnetworks.com \
    --cc=kvm@vger.kernel.org \
    --cc=will.deacon@arm.com \
    /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