WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH 2/3] xenoprof fixes: active_domains races

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] [PATCH 2/3] xenoprof fixes: active_domains races
From: Markus Armbruster <armbru@xxxxxxxxxx>
Date: Mon, 15 May 2006 21:15:47 +0200
Delivery-date: Mon, 15 May 2006 12:16:09 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20060515185310.GC2724@xxxxxxxxxxxxxxxxx> (Chris Wright's message of "Mon, 15 May 2006 11:53:10 -0700")
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: <87hd3r2qst.fsf@xxxxxxxxxxxxxxxxx> <878xp32qqf.fsf@xxxxxxxxxxxxxxxxx> <20060515185310.GC2724@xxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)
Chris Wright <chrisw@xxxxxxxxxxxx> writes:

> * Markus Armbruster (armbru@xxxxxxxxxx) wrote:
>> --- linux-2.6.16.13-xen.patched-1/drivers/oprofile/oprofile_files.c  
>> 2006-05-15 10:28:11.000000000 +0200
>> +++ linux-2.6.16.13-xen.patched-2/drivers/oprofile/oprofile_files.c  
>> 2006-05-15 10:31:11.000000000 +0200
>> @@ -128,6 +128,7 @@ static struct file_operations dump_fops 
>>  
>>  unsigned int adomains = 0;
>>  long active_domains[MAX_OPROF_DOMAINS];
>> +static DECLARE_MUTEX(adom_sem);
>
> Sorry, didn't mention this earlier.  Please use new mutex code here,
> smth like:
>
> s/DECLARE_MUTEX(adom_sec)/DEFINE_MUTEX(adomain_mutex)/
> s/down(&adom_sem)/mutex_lock(&adomain_mutex)/
> s/up(&adom_sem)/mutex_unlock(&admoain_mutex)/
>
> thanks,
> -chris

What about buffer_sem in drivers/oprofile/event_buffer.c and start_sem
in drivers/oprofile/oprof.c?  Want me to submit a patch to convert all
three?

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

<Prev in Thread] Current Thread [Next in Thread>