
On 08/26/2014 06:42 PM, John Ferlan wrote:
On 08/26/2014 12:04 PM, Ján Tomko wrote:
On 08/26/2014 02:38 AM, John Ferlan wrote:
Add a new disk "driver" attribute "iothread" to be parsed as the thread number for the disk to use. In order to more easily facilitate the usage and configuration of the iothread, a "zero" for the attribute indicates iothreads are not supported for the device and a positive value indicates the specific thread to try and use.
Signed-off-by: John Ferlan <jferlan@redhat.com> --- docs/formatdomain.html.in | 8 ++++++++ docs/schemas/domaincommon.rng | 13 +++++++++++++ src/conf/domain_conf.c | 24 +++++++++++++++++++++++- src/conf/domain_conf.h | 2 ++ 4 files changed, 46 insertions(+), 1 deletion(-)
@@ -11968,6 +11980,14 @@ virDomainDefParseXML(xmlDocPtr xml, goto error; } def->iothreads = count; + + /* Create a bitmap for inuse threads - noting that entries are + * numbered 1..def->iothreads since 0 (zero) iothreads means + * nothing and assigning a disk to an IOThread requires at least a + * thread# > 0 since a zero would indicate no IOThread for the disk + */ + if (!(def->iothreadmap = virBitmapNew(def->iothreads+1))) + goto error; }
Do you plan to do multiple disks on a single iothread in the followup patches? Or is that a configuration that doesn't make sense?
I would say it doesn't make sense and from the bz I have the comment is "2. 1 IOThread per device" (bz 1101574 if you care to read although it's mostly private comments though which is why I didn't put it in the patches).
I was wondering what's up with all the private comments. Hopefully I can share the bit you're quoting: There are basically two ways to use IOThreads: 1. 1 or maybe 2 IOThreads per host CPU 2. 1 IOThread per device For usage 1), can you just add some <iothreads> to the domain XML and they will automatically be used, or do you need to 'bind' the specific disk devices to them? Jan