Re: q-tools OOPS: Fixed perfmon.

From: Matthew Wilcox <willy_at_debian.org>
Date: 2003-12-09 12:24:01
On Tue, Dec 09, 2003 at 11:17:56AM +1100, Peter Chubb wrote:
> Here's a  fix for non-preemption safety in perfmon.c.
> 
> I haven't tried it while running a preemption stress test, but this
> allows q-syscollect to work.
> 
> ===== arch/ia64/kernel/perfmon.c 1.67 vs edited =====
> --- 1.67/arch/ia64/kernel/perfmon.c   Tue Oct 28 17:36:50 2003
> +++ edited/arch/ia64/kernel/perfmon.c Tue Dec  9 10:55:58 2003
> @@ -5475,7 +5475,7 @@
> 	int this_cpu;
> 	int ret;
>  
> -	this_cpu = smp_processor_id();
> +	this_cpu = get_cpu();
> 	min      = pfm_stats[this_cpu].pfm_ovfl_intr_cycles_min;
> 	max      = pfm_stats[this_cpu].pfm_ovfl_intr_cycles_max;

surely there needs to be a matching put_cpu() or else preempt is forever
disabled.  no?

-- 
"Next the statesmen will invent cheap lies, putting the blame upon 
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince 
himself that the war is just, and will thank God for the better sleep 
he enjoys after this process of grotesque self-deception." -- Mark Twain
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Mon Dec 8 20:24:24 2003

This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:20 EST