* [Linux-ia64] important perfmon fix for 2.4.20
@ 2003-01-03 19:53 Stephane Eranian
0 siblings, 0 replies; only message in thread
From: Stephane Eranian @ 2003-01-03 19:53 UTC (permalink / raw)
To: linux-ia64
[-- Attachment #1: Type: text/plain, Size: 415 bytes --]
Hi,
I discovered a problem with perfmon in the latest 2.4.20 kernel from Bjorn.
System wide monitoring in SMP system was broken due to a bug introduced in
my previous patch. The task pinning was done incorrectly, leading to conflicts
detected by pfmon. Other tools running system wide are also affected.
Please apply the attached patch to your 2.4.20 tree to correct the problem.
Happy New Year!
--
-Stephane
[-- Attachment #2: perfmon-030103.diff --]
[-- Type: text/plain, Size: 1565 bytes --]
--- linux.2420-official/arch/ia64/kernel/perfmon.c 2003-01-03 10:09:11.000000000 -0800
+++ build.2420-new/arch/ia64/kernel/perfmon.c 2003-01-03 11:15:53.000000000 -0800
@@ -261,7 +261,7 @@
u64 ctx_saved_psr; /* copy of psr used for lazy ctxsw */
unsigned long ctx_saved_cpus_allowed; /* copy of the task cpus_allowed (system wide) */
- unsigned long ctx_cpu; /* cpu to which perfmon is applied (system wide) */
+ unsigned long ctx_cpu_mask; /* where owner can run, 1 bit set system wide) */
atomic_t ctx_saving_in_progress; /* flag indicating actual save in progress */
atomic_t ctx_is_busy; /* context accessed by overflow handler */
@@ -1089,7 +1089,7 @@
{
pfarg_context_t tmp;
void *uaddr = NULL;
- int ret, cpu = 0;
+ int ret;
int ctx_flags;
pid_t notify_pid;
@@ -1204,7 +1204,7 @@
ctx->ctx_fl_protected = 0;
/* for system wide mode only (only 1 bit set) */
- ctx->ctx_cpu = cpu;
+ ctx->ctx_cpu_mask = tmp.ctx_cpu_mask;
atomic_set(&ctx->ctx_last_cpu,-1); /* SMP only, means no CPU */
@@ -1237,7 +1237,7 @@
*/
if (ctx->ctx_fl_system) {
ctx->ctx_saved_cpus_allowed = task->cpus_allowed;
- task->cpus_allowed = 1UL << cpu;
+ task->cpus_allowed = ctx->ctx_cpu_mask;
task->need_resched = 1;
DBprintk(("[%d] rescheduled allowed=0x%lx\n", task->pid,task->cpus_allowed));
}
@@ -4048,7 +4048,7 @@
UNLOCK_CTX(ctx);
- pfm_unreserve_session(task, ctx->ctx_fl_system, 1UL << ctx->ctx_cpu);
+ pfm_unreserve_session(task, ctx->ctx_fl_system, ctx->ctx_cpu_mask);
if (ctx->ctx_fl_system) {
/*
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-01-03 19:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-03 19:53 [Linux-ia64] important perfmon fix for 2.4.20 Stephane Eranian
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox