All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vinicius Costa Gomes <vinicius.gomes@intel.com>
To: Eric Dumazet <eric.dumazet@gmail.com>,
	Dmitry Vyukov <dvyukov@google.com>
Cc: "Zhang\, Qiang" <Qiang.Zhang@windriver.com>,
	syzbot <syzbot+9f78d5c664a8c33f4cce@syzkaller.appspotmail.com>,
	"davem\@davemloft.net" <davem@davemloft.net>,
	"fweisbec\@gmail.com" <fweisbec@gmail.com>,
	"jhs\@mojatatu.com" <jhs@mojatatu.com>,
	"jiri\@resnulli.us" <jiri@resnulli.us>,
	"linux-kernel\@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"mingo\@kernel.org" <mingo@kernel.org>,
	"netdev\@vger.kernel.org" <netdev@vger.kernel.org>,
	"syzkaller-bugs\@googlegroups.com"
	<syzkaller-bugs@googlegroups.com>,
	"tglx\@linutronix.de" <tglx@linutronix.de>,
	"xiyou.wangcong\@gmail.com" <xiyou.wangcong@gmail.com>
Subject: Re: 回复: INFO: rcu detected stall in tc_modify_qdisc
Date: Thu, 30 Jul 2020 14:01:05 -0700	[thread overview]
Message-ID: <87k0ykyay6.fsf@intel.com> (raw)
In-Reply-To: <3fc2ce1b-553a-e6de-776c-7e4d668c6ecb@gmail.com>

Hi Eric,

Eric Dumazet <eric.dumazet@gmail.com> writes:

>> I admit that I am on the fence on that argument: do not let even root
>> crash the system (the point that my code is crashing the system gives
>> weight to this side) vs. root has great powers, they need to know what
>> they are doing.
>> 
>> The argument that I used to convince myself was: root can easily create
>> a bunch of processes and give them the highest priority and do
>> effectively the same thing as this issue, so I went with a the "they
>> need to know what they are doing side".
>> 
>> A bit more on the specifics here:
>> 
>>   - Using a small interval size, is only a limitation of the taprio
>>   software mode, when using hardware offloads (which I think most users
>>   do), any interval size (supported by the hardware) can be used;
>> 
>>   - Choosing a good lower limit for this seems kind of hard: something
>>   below 1us would never work well, I think, but things 1us < x < 100us
>>   will depend on the hardware/kernel config/system load, and this is the
>>   range includes "useful" values for many systems.
>> 
>> Perhaps a middle ground would be to impose a limit based on the link
>> speed, the interval can never be smaller than the time it takes to send
>> the minimum ethernet frame (for 1G links this would be ~480ns, should be
>> enough to catch most programming mistakes). I am going to add this and
>> see how it looks like.
>> 
>> Sorry for the brain dump :-)
>
>
> I do not know taprio details, but do you really need a periodic timer
> ?

As we can control the transmission time of packets, you are right, I
don't.

Just a bit more detail about the current implementation taprio,
basically it has a sequence of { Traffic Classes that are open; Interval
} that repeats cyclicly, it uses an hrtimer to advance the pointer for
the current element, so during dequeue I can check if a traffic class is
"open" or "closed".

But again, if I calculate the 'skb->tstamp' of each packet during
enqueue, I don't need the hrtimer. What we have in the txtime-assisted
mode is half way there.

I think this is what you had in mind.


Cheers,
-- 
Vinicius

  reply	other threads:[~2020-07-30 21:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-29  5:53 INFO: rcu detected stall in tc_modify_qdisc syzbot
2020-07-29  7:28 ` 回复: " Zhang, Qiang
2020-07-29 19:13   ` Vinicius Costa Gomes
2020-07-30  5:58     ` Dmitry Vyukov
2020-07-30 17:44       ` Vinicius Costa Gomes
2020-07-30 18:36         ` Eric Dumazet
2020-07-30 21:01           ` Vinicius Costa Gomes [this message]
2020-07-30 19:19         ` Dmitry Vyukov
2020-07-30 22:01           ` Vinicius Costa Gomes

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=87k0ykyay6.fsf@intel.com \
    --to=vinicius.gomes@intel.com \
    --cc=Qiang.Zhang@windriver.com \
    --cc=davem@davemloft.net \
    --cc=dvyukov@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=fweisbec@gmail.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=syzbot+9f78d5c664a8c33f4cce@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=tglx@linutronix.de \
    --cc=xiyou.wangcong@gmail.com \
    /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.