All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jarek Poplawski <jarkao2@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH]: Schedule correct qdisc in watchdog.
Date: Mon, 18 Aug 2008 10:35:59 +0000	[thread overview]
Message-ID: <20080818103559.GA6548@ff.dom.local> (raw)
In-Reply-To: <20080818.031003.115715822.davem@davemloft.net>

On Mon, Aug 18, 2008 at 03:10:03AM -0700, David Miller wrote:
> From: Jarek Poplawski <jarkao2@gmail.com>
> Date: Mon, 18 Aug 2008 09:47:27 +0000
> 
> > Maybe I wrote this wrong. wd->qdisc stores qdisc from the
> > qdisc_watchdog_init() time, and this could be &noop_qdisc.
> > So qdisc_root() would schedule wrong qdisc later. BTW, my
> > version would probably do the same for root qdisc, but in
> > these tests there was a problem with leafs.
> 
> qdisc_watchdog_init() is only invoked by:
> 
> net/sched/sch_cbq.c:	qdisc_watchdog_init(&q->watchdog, sch);
> net/sched/sch_hfsc.c:	qdisc_watchdog_init(&q->watchdog, sch);
> net/sched/sch_htb.c:	qdisc_watchdog_init(&q->watchdog, sch);
> net/sched/sch_netem.c:	qdisc_watchdog_init(&q->watchdog, sch);
> net/sched/sch_tbf.c:	qdisc_watchdog_init(&q->watchdog, sch);
> 
> These "q" things are the scheduler private structs, and 'sch' of the
> qdisc type indicated by the source file the code in question resides
> :-)
> 
> This watchdog is different from the TX timeout watchdog which is
> implemented in net/sch/sch_generic.c, which you may be confusing this
> qdisc_watchdog_init() one with.

I don't think I wrote anything which could suggest I confused these
watchdogs.

> 
> The watchdog we are discussing here is purely for qdiscs where time
> based events modify qdisc state (such as making new quotas available
> for a flow, thus making certain packets eligible for scheduling that
> were not beforehand)
> 
> So really, it cannot be &noop_qdisc as far as I can see.
> :-)

Sure, ->sch is never &noop_qdisc, but your qdisc_root(sch) most
probably is at the moment of qdisc_watchdog_init(). My version
can do the same if eg. htb is root qdisc because at the moment
of qdisc_create() qdisc_sleeping could be &noop_qdisc as well.
But, in case we have a qdisc_sleeping already, it should work.

So these patches will stop break things, but these qdisc_watchdog()
calls would be sometimes/always useless.

Jarek P.

  reply	other threads:[~2008-08-18 10:36 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-18  8:39 [PATCH]: Schedule correct qdisc in watchdog David Miller
2008-08-18  9:10 ` Jarek Poplawski
2008-08-18  9:31   ` David Miller
2008-08-18  9:47     ` Jarek Poplawski
2008-08-18 10:10       ` David Miller
2008-08-18 10:35         ` Jarek Poplawski [this message]
2008-08-18 10:43           ` Jarek Poplawski
2008-08-18 11:04             ` Denys Fedoryshchenko
2008-08-18 11:20               ` Jarek Poplawski
2008-08-18 11:35                 ` Jarek Poplawski
2008-08-18 12:45                   ` Denys Fedoryshchenko
2008-08-18 12:58                     ` Jarek Poplawski
2008-08-18 23:56                       ` David Miller
2008-08-19  5:37                         ` Jarek Poplawski
2008-08-19  5:39                           ` David Miller
2008-08-19  5:42                           ` Jarek Poplawski
2008-08-18 15:55                     ` Jarek Poplawski
2008-08-18 18:05                       ` Denys Fedoryshchenko
2008-08-19  3:54                   ` David Miller
2008-08-19  6:59                     ` Jarek Poplawski
2008-08-19  7:03                       ` David Miller
2008-08-18 11:06             ` Jarek Poplawski
2008-08-19  3:51               ` David Miller
2008-08-19  4:08                 ` David Miller

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=20080818103559.GA6548@ff.dom.local \
    --to=jarkao2@gmail.com \
    --cc=davem@davemloft.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.