Re: [RFC][PATCH] avoid cpu hot remove of cpus which have special RT tasks.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Jun 17, 2006 at 01:46:23AM +0900, KAMEZAWA Hiroyuki wrote:
> +		if (tsk->mm && stop_derailed_process) {
> +			force = 1;
> +			printk(KERN_INFO, "process %d (%s) is stopped "
> +			       "by stop_derailed_process sysctl\n",
> +				tsk->pid, tsk->comm);
> +		}
>  	}
>  	__migrate_task(tsk, dead_cpu, dest_cpu);
> +	if (force)
> +		force_sig_specific(SIGSTOP, tsk);
>  }
>  

Humm, dont know killing tasks is a good thing, unless the thread specifically 
asked for it.

I dont know if there are bad cases, but if a thread just switched itself to 
get to some per cpu data its best to ensure it does that consistently.

i see some code in kernel that does this today


        cpumask_t save_cpus_allowed = current->cpus_allowed;
        cpumask_t new_cpus_allowed = cpumask_of_cpu(cpu);
        set_cpus_allowed(current, new_cpus_allowed);
        (*fn)(arg);
        set_cpus_allowed(current, save_cpus_allowed);

Probably such code should use a get_cpu()/put_cpu() to ensure they do this on 
the right context to ensure they are not switched.

Should we have this flag on a per-task so we know if this task should be 
killed, or could be migrated without damage (assuming its going to run slow, 
but nothing critically bad will happen)

Iam just worried if killing them globally without giving them a chance is 
any good and favorite apps such as databases will have probably have
ill effects.

Cheers,
ashok
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux