All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: "Elliott, Robert (Server Storage)" <Elliott@hp.com>,
	"fio@vger.kernel.org" <fio@vger.kernel.org>
Subject: Re: cpus_allowed per thread behavior
Date: Wed, 26 Feb 2014 16:08:22 -0800	[thread overview]
Message-ID: <530E81F6.7070305@kernel.dk> (raw)
In-Reply-To: <94D0CD8314A33A4D9D801C0FE68B4029548AB930@G9W0745.americas.hpqcorp.net>

On 2014-02-26 15:54, Elliott, Robert (Server Storage) wrote:
> fio seems to assign the same cpus_allowed/cpumask value to all threads.
 > I think this allows the OS to move the threads around those CPUs.

Correct. As long as the number of cpus in the mask is equal to (or 
larger than) the number of jobs within that group, the OS is free to 
place them wherever it wants. In practice, unless the CPU scheduling is 
horribly broken, they tend to "stick" for most intents and purposes.

> In comparison, iometer assigns its worker threads to specific CPUs
 > within the cpumask in round-robin manner.  Would that be worth adding
 > to fio, perhaps with an option like cpus_allowed_policy=roundrobin?

Sure, we could add that feature. You can get the same setup now, if you 
"unroll" the job section, but that might not always be practical. How 
about cpus_allowed_policy, with 'shared' being the existing (and 
default) behavior and 'split' being each thread grabbing one of the CPUs?

-- 
Jens Axboe



  reply	other threads:[~2014-02-27  0:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-26 23:54 cpus_allowed per thread behavior Elliott, Robert (Server Storage)
2014-02-27  0:08 ` Jens Axboe [this message]
2014-02-27  1:12   ` Elliott, Robert (Server Storage)
2014-02-27 17:10     ` Jens Axboe
2014-02-27 17:52       ` Jens Axboe
2014-02-28 22:35       ` Elliott, Robert (Server Storage)

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=530E81F6.7070305@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=Elliott@hp.com \
    --cc=fio@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.