All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cong Wang <xiyou.wangcong@gmail.com>
To: "Václav Zindulka" <vaclav.zindulka@tlapnet.cz>
Cc: Linux Kernel Network Developers <netdev@vger.kernel.org>
Subject: Re: iproute2: tc deletion freezes whole server
Date: Wed, 25 Mar 2020 10:43:08 -0700	[thread overview]
Message-ID: <CAM_iQpW8xSpTQP7+XKORS0zLTWBtPwmD1OsVE9tC2YnhLotU3A@mail.gmail.com> (raw)
In-Reply-To: <CANxWus9yWwUq9YKE=d5T-6UutewFO01XFnvn=KHcevUmz27W0A@mail.gmail.com>

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

On Wed, Mar 25, 2020 at 4:28 AM Václav Zindulka
<vaclav.zindulka@tlapnet.cz> wrote:
>
> On Tue, Mar 24, 2020 at 11:57 PM Cong Wang <xiyou.wangcong@gmail.com> wrote:
> > Hm, my bad, please also run `perf report -g` after you record them,
> > we need the text output with stack traces.
>
> No problem. I've created reports on two servers with different cards.
> See here https://github.com/zvalcav/tc-kernel/tree/master/20200325

That is great!

Your kernel log does not show anything useful, so it did not lead to
any kernel hang or crash etc. at all. (This also means you do not need
to try kdump.)

Are you able to test an experimental patch attached in this email?

It looks like your kernel spent too much time in fq_codel_reset(),
most of it are unnecessary as it is going to be destroyed right after
resetting.

Note: please do not judge the patch, it is merely for testing purpose.
It is obviously ugly and is only a proof of concept. A complete one
should be passing a boolean parameter down to each ->reset(),
but it would be much larger.

Thanks for testing!

[-- Attachment #2: fq_codel_reset.diff --]
[-- Type: application/octet-stream, Size: 585 bytes --]

diff --git a/net/sched/sch_fq_codel.c b/net/sched/sch_fq_codel.c
index 968519ff36e9..df781fd4ff56 100644
--- a/net/sched/sch_fq_codel.c
+++ b/net/sched/sch_fq_codel.c
@@ -337,6 +337,15 @@ static void fq_codel_reset(struct Qdisc *sch)
 	struct fq_codel_sched_data *q = qdisc_priv(sch);
 	int i;
 
+	if (refcount_read(&sch->refcnt) == 0) {
+		for (i = 0; i < q->flows_cnt; i++) {
+			struct fq_codel_flow *flow = q->flows + i;
+
+			fq_codel_flow_purge(flow);
+		}
+		return;
+	}
+
 	INIT_LIST_HEAD(&q->new_flows);
 	INIT_LIST_HEAD(&q->old_flows);
 	for (i = 0; i < q->flows_cnt; i++) {

  parent reply	other threads:[~2020-03-25 17:43 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-22 18:06 iproute2: tc deletion freezes whole server Václav Zindulka
2020-03-23 18:17 ` Cong Wang
2020-03-24 16:27   ` Václav Zindulka
2020-03-24 22:57     ` Cong Wang
2020-03-25 11:27       ` Václav Zindulka
2020-03-25 13:33         ` Václav Zindulka
2020-03-25 17:43         ` Cong Wang [this message]
2020-03-25 18:23           ` Václav Zindulka
2020-03-26 14:24             ` Václav Zindulka
2020-03-26 17:07               ` Cong Wang
2020-03-26 17:38                 ` Cong Wang
2020-03-27 10:35                   ` Václav Zindulka
2020-03-28 13:04                     ` Václav Zindulka
2020-03-31  5:59                       ` Cong Wang
2020-03-31 12:46                         ` Václav Zindulka
2020-04-08 20:18                           ` Cong Wang
2020-04-12 20:17                             ` Václav Zindulka
2020-04-13 17:28                               ` Cong Wang
2020-04-15 15:01                                 ` Václav Zindulka
2020-04-30 12:40                                   ` Václav Zindulka
2020-05-04 17:46                                     ` Cong Wang
2020-05-04 20:36                                       ` Cong Wang
2020-05-05  8:46                                         ` Václav Zindulka
2020-05-07 18:52                                           ` Cong Wang
2020-05-08 13:59                                             ` Václav Zindulka
2020-05-17 19:35                                               ` Cong Wang
2020-05-18 14:16                                                 ` Václav Zindulka
2020-05-18 18:22                                                   ` Cong Wang
2020-05-19  8:04                                                     ` Václav Zindulka
2020-05-19 17:56                                                       ` Cong Wang
2020-05-24 10:03                                                         ` Václav Zindulka
2020-05-26 18:37                                                           ` Cong Wang

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=CAM_iQpW8xSpTQP7+XKORS0zLTWBtPwmD1OsVE9tC2YnhLotU3A@mail.gmail.com \
    --to=xiyou.wangcong@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=vaclav.zindulka@tlapnet.cz \
    /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.