From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
To: Eric Dumazet <edumazet@google.com>,
Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Cc: "David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>,
Willem de Bruijn <willemb@google.com>,
Jeffrey Ji <jeffreyji@google.com>,
netdev@vger.kernel.org, eric.dumazet@gmail.com
Subject: Re: [PATCH net-next 2/2] net_sched: sch_fq: add the ability to offload pacing
Date: Mon, 30 Sep 2024 14:17:18 -0400 [thread overview]
Message-ID: <66faeb2ed4866_18b99529496@willemb.c.googlers.com.notmuch> (raw)
In-Reply-To: <CANn89iKdVt7AAh0bcx=zEUz0O+oBneOHvq2EjRbyNifQozEv4A@mail.gmail.com>
Eric Dumazet wrote:
> On Mon, Sep 30, 2024 at 7:33 PM Willem de Bruijn
> <willemdebruijn.kernel@gmail.com> wrote:
> >
> > Eric Dumazet wrote:
> > > From: Jeffrey Ji <jeffreyji@google.com>
> > >
> > > Some network devices have the ability to offload EDT (Earliest
> > > Departure Time) which is the model used for TCP pacing and FQ packet
> > > scheduler.
> > >
> > > Some of them implement the timing wheel mechanism described in
> > > https://saeed.github.io/files/carousel-sigcomm17.pdf
> > > with an associated 'timing wheel horizon'.
> > >
> > > This patchs adds to FQ packet scheduler TCA_FQ_OFFLOAD_HORIZON
> > > attribute.
> > >
> > > Its value is capped by the device max_pacing_offload_horizon,
> > > added in the prior patch.
> > >
> > > It allows FQ to let packets within pacing offload horizon
> > > to be delivered to the device, which will handle the needed
> > > delay without host involvement.
> > >
> > > Signed-off-by: Jeffrey Ji <jeffreyji@google.com>
> > > Signed-off-by: Eric Dumazet <edumazet@google.com>
> >
> > > @@ -1100,6 +1105,17 @@ static int fq_change(struct Qdisc *sch, struct nlattr *opt,
> > > WRITE_ONCE(q->horizon_drop,
> > > nla_get_u8(tb[TCA_FQ_HORIZON_DROP]));
> > >
> > > + if (tb[TCA_FQ_OFFLOAD_HORIZON]) {
> > > + u64 offload_horizon = (u64)NSEC_PER_USEC *
> > > + nla_get_u32(tb[TCA_FQ_OFFLOAD_HORIZON]);
> > > +
> > > + if (offload_horizon <= qdisc_dev(sch)->max_pacing_offload_horizon) {
> > > + WRITE_ONCE(q->offload_horizon, offload_horizon);
> >
> > Do we expect that that an administrator will ever set the offload
> > horizon different from the device horizon?
>
> We want to be able to eventually deal with firmware/hardware bugs,
> like lack of backpressure on the timer wheel, which probably has some
> kind of capacity limit.
>
> I think it is much better to let the admin choose, eventually
> disabling the whole thing, or enabling it for a small horizon like
> 2500 ns.
>
> >
> > It might be useful to have a wildcard value that means "match
> > hardware ability"?
>
> "ip link" will show the device max capability.
> Same story for gso_max_size attribute.
> We do not automatically set it to dev->tso_max_size
>
> I do not think we have a precedent for a qdisc/link attribute where
> the kernel automatically caps the user
> choice with the device capability.
>
> >
> > Both here and in the device, realistic values will likely always be
> > MSEC scale?
>
> msec granularity proved to be not good for TCP stack, we went to us already.
>
> Fast path compares in ns unit, storing the value in ns removes
> multiplies from it.
Ack on all points. Thanks Eric.
next prev parent reply other threads:[~2024-09-30 18:17 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-30 15:23 [PATCH net-next 0/2] net: prepare pacing offload support Eric Dumazet
2024-09-30 15:23 ` [PATCH net-next 1/2] net: add IFLA_MAX_PACING_OFFLOAD_HORIZON device attribute Eric Dumazet
2024-09-30 18:36 ` Willem de Bruijn
2024-10-02 13:47 ` Jakub Kicinski
2024-10-02 14:06 ` Eric Dumazet
2024-09-30 15:23 ` [PATCH net-next 2/2] net_sched: sch_fq: add the ability to offload pacing Eric Dumazet
2024-09-30 17:33 ` Willem de Bruijn
2024-09-30 17:55 ` Eric Dumazet
2024-09-30 18:17 ` Willem de Bruijn [this message]
2024-09-30 18:38 ` Willem de Bruijn
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=66faeb2ed4866_18b99529496@willemb.c.googlers.com.notmuch \
--to=willemdebruijn.kernel@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=eric.dumazet@gmail.com \
--cc=jeffreyji@google.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=willemb@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox