From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Thomas Gleixner <tglx@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: Wed, 14 Sep 2016 19:14:16 +0200 [thread overview]
Message-ID: <20160914171416.c2k7l2flu4ufdks2@linutronix.de> (raw)
In-Reply-To: <alpine.DEB.2.20.1609100811410.9305@nanos>
On 2016-09-10 08:17:13 [+0200], Thomas Gleixner wrote:
> 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.
something like
|#ifdef CONFIG_SMP
| task_running(task_rq(lock_owner), lock_owner))
|#else
| 1)
|#endif
| cpu_chill();
the lock_owner is tricky because we have two locks: inode->i_lock and
parent->d_lock. So we would have to do the same lookup, like
dentry_kill() is doing, and check both in worth case.
Sebastian
prev parent reply other threads:[~2016-09-14 17:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-08 18:25 [PATCH] fs/dcache: resched/chill only if we make no progress Sebastian Andrzej Siewior
2016-09-10 6:17 ` Thomas Gleixner
2016-09-14 17:14 ` Sebastian Andrzej Siewior [this message]
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=20160914171416.c2k7l2flu4ufdks2@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).