xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Keir Fraser <keir.fraser@eu.citrix.com>
To: Dulloor <dulloor@gmail.com>,
	"xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>
Cc: Jan Beulich <JBeulich@novell.com>
Subject: Re: [PATCH] libxc bitmap utils and vcpu-affinity
Date: Tue, 30 Mar 2010 16:16:22 +0100	[thread overview]
Message-ID: <C7D7D456.F136%keir.fraser@eu.citrix.com> (raw)
In-Reply-To: <940bcfd21003300742s28db15dbm9bf3316f8625f180@mail.gmail.com>

No changeset comment. No signed-off-by line. It actually bloats the
libraries by a net 650 LOC (747 added, 87 deleted according to diffstat).
And below I append the very first function I read: it doesn't inspire
confidence that the implementation is over-complicated/long and
unnecessarily handles 16-bit values. Why should I show your patch some love?

 -- Keir

+static inline int __xc_ffs(uint8_t byte)
+{
+       int num = 0;
+
+       if ((byte & 0xff) == 0) {
+               num += 8;
+               byte >>= 8;
+       }
+       if ((byte & 0xf) == 0) {
+               num += 4;
+               byte >>= 4;
+       }
+       if ((byte & 0x3) == 0) {
+               num += 2;
+               byte >>= 2;
+       }
+       if ((byte & 0x1) == 0)
+               num += 1;
+       return num;
+}

On 30/03/2010 15:42, "Dulloor" <dulloor@gmail.com> wrote:

> Resubmitting the patch.
> 
> -dulloor
> 
> ---------- Forwarded message ----------
> From: Dulloor <dulloor@gmail.com>
> Date: Tue, Mar 23, 2010 at 12:55 PM
> Subject: Re: [Xen-devel][PATCH] libxc bitmap utils and vcpu-affinity
> To: Keir Fraser <keir.fraser@eu.citrix.com>
> Cc: Jan Beulich <JBeulich@novell.com>, "xen-devel@lists.xensource.com"
> <xen-devel@lists.xensource.com>
> 
> 
> Please use this patch, in which length of bitmap is
> (physinfo.max_cpu_id+1), rather than (physinfo.nr_cpus).
> 
> -dulloor
> 
> On Tue, Mar 23, 2010 at 12:41 PM, Dulloor <dulloor@gmail.com> wrote:
>> I meant utils for **xenctl_cpumap**
>> 
>> On Tue, Mar 23, 2010 at 12:40 PM, Dulloor <dulloor@gmail.com> wrote:
>>> Fine, I agree with you both. Attached is a patch adding utils for
>>> xenctl_bitmap (to libxc) and using the same in vcpu_(get|set)affinity.
>>> For the guest-numa interface, I will see if I can use xenctl_cpumap.
>>> 
>>> -dulloor
>>> 
>>> On Tue, Mar 23, 2010 at 7:05 AM, Keir Fraser <keir.fraser@eu.citrix.com>
>>> wrote:
>>>> On 23/03/2010 10:10, "Jan Beulich" <JBeulich@novell.com> wrote:
>>>> 
>>>>>>>> Dulloor <dulloor@gmail.com> 22.03.10 18:44 >>>
>>>>>> Motivation for using xenctl_cpumask in Xen interfaces :
>>>>>> - xenctl_cpumap is just 4 bytes smaller than static xenctl_cpumask for
>>>>>> 128 cpus (128 would be good for quite some time). However, the new
>>>>> 
>>>>> I don't buy this (we're already building for 256 CPUs, looking forward
>>>>> to further bump this in the not too distant future), and I'm generally
>>>>> opposed to introducing hard coded limits in a public interface.
>>>> 
>>>> We should use xenctl_cpumask everywhere for specifying physical CPU
>>>> bitmaps,
>>>> even into guest NUMA interfaces if appropriate. I don't really care if it
>>>> is
>>>> a bit harder to use than a static bitmap.
>>>> 
>>>>  -- Keir
>>>> 
>>>> 
>>>> 
>>> 
>> 

  reply	other threads:[~2010-03-30 15:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-22  3:33 [PATCH] libxc bitmap utils and vcpu-affinity Dulloor
2010-03-22  7:30 ` Keir Fraser
2010-03-22 17:44   ` Dulloor
2010-03-23 10:10     ` Jan Beulich
2010-03-23 11:05       ` Keir Fraser
2010-03-23 16:40         ` Dulloor
2010-03-23 16:41           ` Dulloor
2010-03-23 16:55             ` Dulloor
2010-03-30 14:42               ` Fwd: " Dulloor
2010-03-30 15:16                 ` Keir Fraser [this message]
2010-03-30 16:05                   ` Dulloor
2010-03-30 16:27                     ` Keir Fraser

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=C7D7D456.F136%keir.fraser@eu.citrix.com \
    --to=keir.fraser@eu.citrix.com \
    --cc=JBeulich@novell.com \
    --cc=dulloor@gmail.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).