Re: [PATCH v6 1/2] smpboot: allow excluding cpus from the smpboot threads

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

 



On Wed, 8 Apr 2015, cmetcalf@xxxxxxxxxx wrote:
> @@ -173,6 +173,9 @@ __smpboot_create_thread(struct smp_hotplug_thread *ht, unsigned int cpu)
>  	if (tsk)
>  		return 0;
>  
> +	if (ht->valid_cpu && !ht->valid_cpu(cpu))
> +		return 0;
> +
>  	td = kzalloc_node(sizeof(*td), GFP_KERNEL, cpu_to_node(cpu));
>  	if (!td)
>  		return -ENOMEM;
> @@ -221,9 +224,11 @@ static void smpboot_unpark_thread(struct smp_hotplug_thread *ht, unsigned int cp
>  {
>  	struct task_struct *tsk = *per_cpu_ptr(ht->store, cpu);
>  
> -	if (ht->pre_unpark)
> -		ht->pre_unpark(cpu);
> -	kthread_unpark(tsk);
> +	if (tsk) {
> +		if (ht->pre_unpark)
> +			ht->pre_unpark(cpu);
> +		kthread_unpark(tsk);
> +	}

This is a very watchdog centric implementation. The watchdog actually
can afford to unregister/register the per cpu threads when the mask
changes, but other facilities might not.

So I'd like to see the threads still created and have the valid cpu
check in the unpark function. That way you can just park/unpark a
particular per cpu thread when the mask changes and you are not forced
to teardown/reenable the whole facility.

Thanks,

	tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-doc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux