All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: Wei Liu <wei.liu2@citrix.com>
Cc: julien.grall@citrix.com, xen-devel@lists.xenproject.org,
	ian.jackson@citrix.com, stefano.stabellini@eu.citrix.com,
	Linda Jacobson <lindaj@jma3.com>
Subject: Re: [PATCH v6] libxl: provide libxl_bitmap_{or,and}
Date: Wed, 15 Apr 2015 14:29:10 +0100	[thread overview]
Message-ID: <1429104550.15516.287.camel@citrix.com> (raw)
In-Reply-To: <20150415131550.GC8128@zion.uk.xensource.com>

On Wed, 2015-04-15 at 14:15 +0100, Wei Liu wrote:
> On Wed, Apr 15, 2015 at 01:45:14PM +0100, Ian Campbell wrote:
> > On Wed, 2015-04-15 at 05:45 -0600, Linda Jacobson wrote:
> > > There are new functions to provide logical and and or of two bitmaps.
> > 
> > Please could you add a sentence or two on the intended use of these
> > functions, since there are no callers being added here.
> > 
> 
> Linda is our Outreachy applicant. This is a small task that Julien and I
> assigned to her.

Sure, but that doesn't remove the need for the commit log to be a
standalone justification for the patch in its own right.

> One user I can think of is in some of the vNUMA validation functions
> that operate on bitmaps. But to keep this task small and simple I didn't
> ask her to actually use the functions she introduce.
> 
> > In particular without that I can't tell if these need to be part of the
> > public API or if they are going to be used by something internal.
> > 
> 
> I think these functions should be public functions.

Sure, but the reasoning for why you^WLinda thinks that needs to be in
the commit log. In particular because there are no users being added.

I could probably guess why you think these should be public, but I
shouldn't have to guess and in any case that doesn't help in 6 months
when someone asks "why do we have these functions".

> > If the former then I think a LIBXL_HAVE_... #define is needed in libxl.h
> > (as described by the comments in there, and there are many examples).
> > 
> 
> We're a bit lax on these functions (there is no LIBXL_HAVE_BITMAP...) 

Weren't they always there and hence don't need it?

Ian.

> so
> I didn't ask her to add one. We can add LIBXL_HAVE_BITMAP_AND_OR in
> libxl.h if you think it is necessary.
> 
> Wei.
> 
> > If the latter then the prototype should differ. (I'll explain that
> > if/when this turns out to be the case).
> > 
> > > diff --git a/tools/libxl/libxl_utils.h b/tools/libxl/libxl_utils.h
> > > index acacdd9..a128a7c 100644
> > > --- a/tools/libxl/libxl_utils.h
> > > +++ b/tools/libxl/libxl_utils.h
> > > @@ -90,6 +90,13 @@ int libxl_bitmap_test(const libxl_bitmap *bitmap, int bit);
> > >  void libxl_bitmap_set(libxl_bitmap *bitmap, int bit);
> > >  void libxl_bitmap_reset(libxl_bitmap *bitmap, int bit);
> > >  int libxl_bitmap_count_set(const libxl_bitmap *cpumap);
> > > +/* Or and and functions for two bitmaps */
> > 
> > This comment doesn't say anything which isn't already apparent from the
> > names and prototypes of the functions in question. Just leave it out.
> > 
> > 
> > > +int libxl_bitmap_or(libxl_ctx *ctx, libxl_bitmap *or_map,
> > > +                    const libxl_bitmap *map1, 
> > > +                    const libxl_bitmap *map2); 
> > > +int libxl_bitmap_and(libxl_ctx *ctx, libxl_bitmap *and_map,
> > > +                     const libxl_bitmap *map1, 
> > > +                     const libxl_bitmap *map2);
> > >  char *libxl_bitmap_to_hex_string(libxl_ctx *ctx, const libxl_bitmap *cpumap);
> > >  static inline void libxl_bitmap_set_any(libxl_bitmap *bitmap)
> > >  {
> > 

  reply	other threads:[~2015-04-15 13:29 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-15 11:45 [PATCH v6] libxl: provide libxl_bitmap_{or,and} Linda Jacobson
2015-04-15 12:45 ` Ian Campbell
2015-04-15 13:15   ` Wei Liu
2015-04-15 13:29     ` Ian Campbell [this message]
2015-04-15 13:41       ` Wei Liu
2015-04-15 13:52         ` Linda Jacobson
2015-04-15 15:13         ` Linda
2015-04-15 15:50           ` Wei Liu
2015-04-15 15:54             ` Ian Campbell
2015-04-15 16:26               ` Linda
2015-04-15 16:38         ` Linda
2015-04-15 16:43           ` Wei Liu
2015-04-15 16:48             ` Linda
2015-04-15 16:44           ` Ian Campbell

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=1429104550.15516.287.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=ian.jackson@citrix.com \
    --cc=julien.grall@citrix.com \
    --cc=lindaj@jma3.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.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.