From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cong Wang Subject: Re: [PATCH net-next] net:sched: add gkprio scheduler Date: Tue, 8 May 2018 19:24:35 -0700 Message-ID: References: <20180507093626.GA5794@gmail.com> <20180508101210.GB4383@gmail.com> <273f91db-7a2f-acda-b306-5a78dd948478@digirati.com.br> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Cc: Nishanth Devarajan , Jiri Pirko , Jamal Hadi Salim , David Miller , Linux Kernel Network Developers , Cody Doucette To: Michel Machado Return-path: Received: from mail-pf0-f193.google.com ([209.85.192.193]:43374 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932526AbeEICY4 (ORCPT ); Tue, 8 May 2018 22:24:56 -0400 Received: by mail-pf0-f193.google.com with SMTP id j20so10544003pff.10 for ; Tue, 08 May 2018 19:24:56 -0700 (PDT) In-Reply-To: <273f91db-7a2f-acda-b306-5a78dd948478@digirati.com.br> Sender: netdev-owner@vger.kernel.org List-ID: On Tue, May 8, 2018 at 5:59 AM, Michel Machado wrote: >>> Overall it looks good to me, just one thing below: >>> >>>> +struct Qdisc_ops gkprio_qdisc_ops __read_mostly = { >>>> + .id = "gkprio", >>>> + .priv_size = sizeof(struct gkprio_sched_data), >>>> + .enqueue = gkprio_enqueue, >>>> + .dequeue = gkprio_dequeue, >>>> + .peek = qdisc_peek_dequeued, >>>> + .init = gkprio_init, >>>> + .reset = gkprio_reset, >>>> + .change = gkprio_change, >>>> + .dump = gkprio_dump, >>>> + .destroy = gkprio_destroy, >>>> + .owner = THIS_MODULE, >>>> +}; >>> >>> >>> You probably want to add Qdisc_class_ops here so that you can >>> dump the stats of each internal queue. > > > Hi Cong, > > In the production scenario we are targeting, this priority queue must be > classless; being classful would only bloat the code for us. I don't see > making this queue classful as a problem per se, but I suggest leaving it as > a future improvement for when someone can come up with a useful scenario for > it. Take a look at sch_prio, it is fairly simple since your internal queues are just an array... Per-queue stats are quite useful in production, we definitely want to observe which queues are full which are not.