mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ben Hutchings <ben@decadent.org.uk>
To: David Miller <davem@davemloft.net>
Cc: mkl@pengutronix.de, linux-rt-users@vger.kernel.org,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	kernel@pengutronix.de
Subject: Re: [PATCH] net: sched: dev_deactivate_many(): use msleep(1) instead of yield() to wait for outstanding qdisc_run calls
Date: Sun, 09 Mar 2014 19:09:20 +0000	[thread overview]
Message-ID: <1394392160.15968.13.camel@deadeye.wl.decadent.org.uk> (raw)
In-Reply-To: <20140306.160622.59358366688518505.davem@davemloft.net>

[-- Attachment #1: Type: text/plain, Size: 1055 bytes --]

On Thu, 2014-03-06 at 16:06 -0500, David Miller wrote:
> From: Marc Kleine-Budde <mkl@pengutronix.de>
> Date: Wed,  5 Mar 2014 00:49:47 +0100
> 
> > @@ -839,7 +839,7 @@ void dev_deactivate_many(struct list_head *head)
> >       /* Wait for outstanding qdisc_run calls. */
> >       list_for_each_entry(dev, head, unreg_list)
> >               while (some_qdisc_is_busy(dev))
> > -                     yield();
> > +                     msleep(1)
> >  }
> 
> I don't understand this.
> 
> yield() should really _mean_ yield.
> 
> The intent of a yield() call, like this one here, is unambiguously
> that the current thread cannot do anything until some other thread
> gets onto the cpu and makes forward progress.
>
> Therefore it should allow lower priority threads to run, not just
> equal or higher priority ones.

Until when?

yield() is not a sensible operation in a preemptive multitasking system,
regardless of RT.

Ben.

-- 
Ben Hutchings
I say we take off; nuke the site from orbit.  It's the only way to be sure.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 811 bytes --]

  parent reply	other threads:[~2014-03-09 19:09 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-04 23:49 Marc Kleine-Budde
2014-03-06 21:06 ` David Miller
2014-03-06 21:39   ` Marc Kleine-Budde
2014-03-07 15:47     ` Sebastian Andrzej Siewior
2014-03-07  4:26   ` Mike Galbraith
2014-03-09 19:09   ` Ben Hutchings [this message]
2014-03-09 22:53     ` David Miller
2014-03-09 23:17       ` Ben Hutchings
2014-03-09 23:28         ` David Lang
2014-03-10  0:07       ` Stanislav Meduna
2014-03-31 21:49       ` [PATCH] net: sched: dev_deactivate_many(): use msleep(1) instead of yield() to wait for outstanding qdisc_run callsb Thomas Gleixner
2014-04-02 11:07         ` Peter Zijlstra
2014-04-02 11:17           ` Eric Dumazet
2014-04-04 15:19             ` Peter Zijlstra
2014-04-04 15:26               ` David Miller
2014-04-07 11:19                 ` Peter Zijlstra
2014-04-04 15:28               ` David Miller
2014-04-07 11:24                 ` Peter Zijlstra

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=1394392160.15968.13.camel@deadeye.wl.decadent.org.uk \
    --to=ben@decadent.org.uk \
    --cc=davem@davemloft.net \
    --cc=kernel@pengutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=netdev@vger.kernel.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®