All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: George Dunlap <george.dunlap@eu.citrix.com>
Cc: ian.jackson@eu.citrix.com, ian.campbell@citrix.com,
	xen-devel@lists.xen.org
Subject: Re: [PATCH v2 2/4] libxc/xentrace: Replace xc_tbuf_set_cpu_mask with CPU mask with xc_cpumap_t instead of uint32_t
Date: Mon, 16 Jun 2014 09:43:35 -0400	[thread overview]
Message-ID: <20140616134335.GB9821@laptop.dumpdata.com> (raw)
In-Reply-To: <539EF174.6040509@eu.citrix.com>

On Mon, Jun 16, 2014 at 02:30:28PM +0100, George Dunlap wrote:
> On 06/13/2014 09:41 PM, Konrad Rzeszutek Wilk wrote:
> >We replace the implementation of xc_tbuf_set_cpu_mask with
> >an xc_cpumap_t instead of a uint32_t. This means we can use an
> >arbitrary bitmap without being limited to the 32-bits as
> >previously we were. Furthermore since there is only one
> >user of xc_tbuf_set_cpu_mask we just replace it and
> >its user in one go.
> >
> >We also add an macro which can be used by both libxc and
> >xentrace.
> >
> >And update the man page to describe this behavior.
> >
> >Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> 
> xentrace side looks good to me, with one minor thing...
> 
> >@@ -513,23 +513,66 @@ static struct t_struct *map_tbufs(unsigned long tbufs_mfn, unsigned int num,
> >      return &tbufs;
> >  }
> >+void print_cpu_mask(xc_cpumap_t mask, int bits)
> >+{
> >+    unsigned int v, had_printed = 0;
> >+    int i;
> >+
> >+    fprintf(stderr, "change cpumask to 0x");
> >+
> >+    for ( i = DIV_ROUND_UP(bits, 8); i >= 0; i-- )
> >+    {
> >+        v = mask[i];
> >+        if ( v || had_printed ) {
> >+            fprintf(stderr,"%x", v);
> >+            had_printed = 1;
> >+        }
> >+   }
> >+   fprintf(stderr, "\n");
> 
> If I'm reading this right, if the user enters "-c 0x0", the output of this
> will be as follows:
> 
>  change cpumask to 0x
> 
> Maybe we should add "i==0" (or "!i") to the conditions under which it will
> print the mask?

Will do in the next posting!
> 
>  -George
> 

  reply	other threads:[~2014-06-16 13:43 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-13 20:41 [PATCH v2] Support CPU-list parsing in xentrace Konrad Rzeszutek Wilk
2014-06-13 20:41 ` [PATCH v2 1/4] xentrace: Use PERROR from xc_private. instead of our own Konrad Rzeszutek Wilk
2014-06-16 11:43   ` George Dunlap
2014-06-16 11:46     ` Ian Campbell
2014-06-16 11:49     ` Andrew Cooper
2014-06-16 13:43       ` Konrad Rzeszutek Wilk
2014-06-13 20:41 ` [PATCH v2 2/4] libxc/xentrace: Replace xc_tbuf_set_cpu_mask with CPU mask with xc_cpumap_t instead of uint32_t Konrad Rzeszutek Wilk
2014-06-16 13:30   ` George Dunlap
2014-06-16 13:43     ` Konrad Rzeszutek Wilk [this message]
2014-06-13 20:41 ` [PATCH v2 3/4] libxc/tbuf: Use the xc_hypercall_bounce_[pre|post] instead of memcpy Konrad Rzeszutek Wilk
2014-06-18 13:55   ` Ian Campbell
2014-06-18 13:59     ` Konrad Rzeszutek Wilk
2014-06-13 20:41 ` [PATCH v2 4/4] xentrace: Implement cpu mask range parsing of human values (-c) Konrad Rzeszutek Wilk
2014-06-16 14:36   ` George Dunlap

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=20140616134335.GB9821@laptop.dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=george.dunlap@eu.citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=xen-devel@lists.xen.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.