Re: [PATCH] fs/dcache: resched/chill only if we make no progress

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

 



On Thu, 8 Sep 2016, Sebastian Andrzej Siewior wrote:
> +		if (parent == dentry) {
> +			/* the task with the highest priority won't schedule */
> +			r = cond_resched();
> +			if (!r && (rt_task(current) || dl_task(current)))

That's wrong because a non RT task will just spin until its time slice is
up. Wasted cycles for nothing.

Ideally we make spinning conditional on 

    !on_cpu(dentry->lock->owner)

That would avoid going to sleep if the owner runs on another cpu. We have
no mechanism for that, but I think it'd be worth to think about one.

> +				cpu_chill();
> +		} else
> +			dentry = parent;

Missing braces

Thanks,

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



[Index of Archives]     [RT Stable]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux