xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Dario Faggioli <raistlin@linux.it>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: George Dunlap <George.Dunlap@eu.citrix.com>,
	Juergen Gross <juergen.gross@ts.fujitsu.com>,
	xen-devel <xen-devel@lists.xensource.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>
Subject: Re: [PATCHv2 2 of 2] libxl: allow for specifying the CPU affinity in the config file.
Date: Wed, 25 Jan 2012 11:44:05 +0100	[thread overview]
Message-ID: <1327488245.2723.1.camel@Abyss> (raw)
In-Reply-To: <1327487306.24561.258.camel@zakaz.uk.xensource.com>


[-- Attachment #1.1: Type: text/plain, Size: 1953 bytes --]

On Wed, 2012-01-25 at 10:28 +0000, Ian Campbell wrote: 
> > +int libxl_set_vcpuaffinity_all(libxl_ctx *ctx, uint32_t domid,
> > +                               unsigned int max_vcpus, libxl_cpumap *cpumap)
> > +{
> > +    int i, rc = 0;
> > +
> > +    for (i = 0; i < max_vcpus; i++) 
> > +        if (libxl_set_vcpuaffinity(ctx, domid, i, cpumap)) {
> > +            LIBXL__LOG(ctx, LIBXL__LOG_WARNING, "no affinity for cpu %d", i);
> 
> "failed to set affinity for ..." would better describe what had happened.
> 
Ok.

> > +static void print_bitmap(uint8_t *map, int maplen, FILE *stream)
> > +{
> [...]
> 
> I assumed this was pure code motion so I didn't read it.
> 
It is.

> > @@ -328,6 +384,9 @@ static void printf_info(int domid,
> >  
> >      printf("\t(build_info)\n");
> >      printf("\t(max_vcpus %d)\n", b_info->max_vcpus);
> > +    printf("\t(CPU affinity ");
> > +    print_bitmap(b_info->cpumap.map, nr_cpus, stdout);
> 
> If libxl_get_physinfo failed then nr_cpus would == -1 here.
> 
> However I don't think it is even necessary to extend this (legacy) sexp
> any further. I'm about to send a patch which will use the print the json
> representation (which is autogenerated).
> 
Ok, then I'll drop this.

> > +static int vcpupin_parse(char *cpu, libxl_cpumap *cpumap);
> 
> There are no calls to vcpupin_parse added after this point by this patch
> so is this necessary? I'd prefer moving the function up in any case or
> at least declaring all the forward references near the top of the file.
> 
Oops. I thought I removed all these fwd-decls. Sorry, seems this one
escaped... Will nuke it. :-)

Thanks,
Dario

-- 
<<This happens because I choose it to happen!>> (Raistlin Majere)
-------------------------------------------------------------------
Dario Faggioli, Ph.D, http://retis.sssup.it/people/faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)



[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

      reply	other threads:[~2012-01-25 10:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-23 18:10 [PATCHv2 0 of 2] libxl: Extend CPU affinity specification and enable it in config file Dario Faggioli
2012-01-23 18:21 ` [PATCHv2 1 of 2] libxl: extend pCPUs specification for vcpu-pin Dario Faggioli
2012-01-25 10:19   ` Ian Campbell
2012-01-25 10:47     ` Dario Faggioli
2012-01-25 11:06       ` Dario Faggioli
2012-01-23 18:22 ` [PATCHv2 2 of 2] libxl: allow for specifying the CPU affinity in the config file Dario Faggioli
2012-01-25 10:28   ` Ian Campbell
2012-01-25 10:44     ` Dario Faggioli [this message]

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=1327488245.2723.1.camel@Abyss \
    --to=raistlin@linux.it \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=juergen.gross@ts.fujitsu.com \
    --cc=xen-devel@lists.xensource.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;
as well as URLs for NNTP newsgroup(s).