mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: linux-rt-users@vger.kernel.org, linux-kernel@vger.kernel.org,
	Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [PATCH] fs/dcache: resched/chill only if we make no progress
Date: Sat, 10 Sep 2016 08:17:13 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.20.1609100811410.9305@nanos> (raw)
In-Reply-To: <20160908182503.bh77mwwhjhiaqf4y@linutronix.de>

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

  reply	other threads:[~2016-09-10  6:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-08 18:25 Sebastian Andrzej Siewior
2016-09-10  6:17 ` Thomas Gleixner [this message]
2016-09-14 17:14   ` Sebastian Andrzej Siewior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.20.1609100811410.9305@nanos \
    --to=tglx@linutronix.de \
    --cc=bigeasy@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®