Xen 
 
Home About Xen.org Xen Xen Summit Wiki Mailing List Bug Tracker Xen Downloads
 
   
 

xen-devel

RE: [Xen-devel] [PATCH 1/9] Add cpu idle pwr mgmt to xen

To: "Keir Fraser" <keir.fraser@xxxxxxxxxxxxx>
Subject: RE: [Xen-devel] [PATCH 1/9] Add cpu idle pwr mgmt to xen
From: "Wei, Gang" <gang.wei@xxxxxxxxx>
Date: Wed, 30 Apr 2008 17:08:52 +0800
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, Jan Beulich <jbeulich@xxxxxxxxxx>
Delivery-date: Wed, 30 Apr 2008 02:09:36 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <C43DF247.20177%keir.fraser@xxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <48183A3F.76E4.0078.0@xxxxxxxxxx> <C43DF247.20177%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Aciqn8RNAuw9vxaTEd2yrAAX8io7RQAAJuMA
Thread-topic: [Xen-devel] [PATCH 1/9] Add cpu idle pwr mgmt to xen
On Wednesday, April 30, 2008 4:54 PM, Keir Fraser wrote:
>> Thanks. Unfortunately you now use a static (but not per-CPU) variable
-
>> while I understand that it is expected that the call is done just
once, I
>> don't think this is a good thing to do.
> 
> Why is the variable even non-local? Is it just to make the
xlat_malloc*()
> interfaces simpler? It's a false simplification if so, and I think
you'd
> be better making the variable an explicit parameter to those
functions.

I was trying to make thing simple, and not aware the per_cpu issue for
global variable. Your suggestion sounds good, I will try to follow it.

> 
> Also I agree with Jan regarding non-ISO C usage of loop-header
variable
> declarations (don't do it) and also you should check
copy_from_guest*()
> return values and return -EFAULT where appropriate. His comment
regarding
> explicit padding or use of uint32_t in your public bitfield also
sounds
> good to me.

Actually, I also agree will Jan regarding the other comments. I am
revising patch for them.

Jimmy

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