From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8BA84C38A2A for ; Thu, 7 May 2020 18:52:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 544542495F for ; Thu, 7 May 2020 18:52:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="s066FSSv" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728426AbgEGSwy (ORCPT ); Thu, 7 May 2020 14:52:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727891AbgEGSwx (ORCPT ); Thu, 7 May 2020 14:52:53 -0400 Received: from mail-oo1-xc42.google.com (mail-oo1-xc42.google.com [IPv6:2607:f8b0:4864:20::c42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9690C05BD43 for ; Thu, 7 May 2020 11:52:53 -0700 (PDT) Received: by mail-oo1-xc42.google.com with SMTP id b17so1598044ooa.0 for ; Thu, 07 May 2020 11:52:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=IV4NcF/F53NWUTcK0gRcws38ofw/IVGjP7ajCbvMeSY=; b=s066FSSv964J7mgqp2NFQBv3HBgixMofa4r0hw8zJBm45dNzvONu6HBv/X1xZDNh27 qep3JX6+jF1SsObRs8H9KW/0YJCn8BUU6lLnDcFxdRpR7idZ5N92pLBlX9s9Hq0zIuHU mTxzt/NXYwGx0gp53deBnujdpc0rTxVLO42L/DIhrbSsPfOIOQ4VAL7gksqXh1x1DXOP j3jEtqpCAj2C5lIHSN4gHZ6ANmhPRgzt/lbvJpAufUPicLXxIhhzKmvTCXnzYV0bgq1G ozVO5AHkp26nYBqpFf7ftt7APA28se4g0WVqOQpwOTFk+zR6T0WB33H96wHzi7zaRSFe G8Sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=IV4NcF/F53NWUTcK0gRcws38ofw/IVGjP7ajCbvMeSY=; b=ASVVn8/LeeMlj4evncRzbHZBGuyukTMmDXJB+J9vGtKDUocagSVN2rw079Rks07U6V /icbM3JFUXetoEVmL2koMia88TsphlJc7KRWVQp6itpGBYY6sL4XyiUYLLxZybQljkeT mz8D/bBPWBpCmIw1XB7ULv9FSsYAlGnx5gTtxejdS85wH/HC66oC7D1KldxIj5f/Ebiq TUmXlHEsXjNB2fkeSszU7V1qf2FgIMWVLfr6NJPxZkm8/6Dr9Ivw5aupdINnnCLeryZ9 Gc2qa5LF8jJLekCChlMto7GNlQIr+Rgi5BQ8bTH7e8ItVObPCklJh/ZIF3IHvaYFl7Y9 x4FQ== X-Gm-Message-State: AGi0PuZTTBHmYvHjLibFuxYTWYOR17zM+71Yec3nwRoAGKdb9smz7jXe fy3+R03RjwR3it5PNCOxSaLluxHOi/lcJhNz5RxjJ8iU X-Google-Smtp-Source: APiQypJnQc6fmEmLyTRtSbOkT1wNp0B4nQBqXvvvTC083KeqBY6xOgtHa4zOFdUSBNAqMfvUnbIyFbbuOJKSiX0/QAQ= X-Received: by 2002:a4a:5147:: with SMTP id s68mr8272584ooa.86.1588877573055; Thu, 07 May 2020 11:52:53 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Cong Wang Date: Thu, 7 May 2020 11:52:42 -0700 Message-ID: Subject: Re: iproute2: tc deletion freezes whole server To: =?UTF-8?Q?V=C3=A1clav_Zindulka?= Cc: Linux Kernel Network Developers Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, May 5, 2020 at 1:46 AM V=C3=A1clav Zindulka wrote: > > On Mon, May 4, 2020 at 7:46 PM Cong Wang wrote= : > > > > Sorry for the delay. I lost connection to my dev machine, I am trying > > to setup this on my own laptop. > > Sorry to hear that. I will gladly give you access to my testing > machine where all this nasty stuff happens every time so you can test > it in place. You can try everything there and have online results. I > can give you access even to the IPMI console so you can switch the > kernel during boot easily. I didn't notice this problem until the time > of deployment. My prior testing machines were with metallic ethernet > ports only so I didn't know about those problems earlier. Thanks for the offer! No worries, I setup a testing VM on my laptop. > > > On Mon, May 4, 2020 at 10:36 PM Cong Wang wr= ote: > > > > > > Regarding to your test result above, I think I saw some difference > > > on my side, I have no idea why you didn't see any difference. Please > > > let me collect the data once I setup the test environment shortly tod= ay. > > I saw some improvement too. It was more than 1.5s faster. Yet it was > still over 21s. I measured it with perf trace, not with time. I'll try > it the same way as you did. > > > > > I tried to emulate your test case in my VM, here is the script I use: > > > > =3D=3D=3D=3D > > ip li set dev dummy0 up > > tc qd add dev dummy0 root handle 1: htb default 1 > > for i in `seq 1 1000` > > do > > tc class add dev dummy0 parent 1:0 classid 1:$i htb rate 1mbit ceil 1= .5mbit > > tc qd add dev dummy0 parent 1:$i fq_codel > > done > > > > time tc qd del dev dummy0 root > > =3D=3D=3D=3D > > > > And this is the result: > > > > Before my patch: > > real 0m0.488s > > user 0m0.000s > > sys 0m0.325s > > > > After my patch: > > real 0m0.180s > > user 0m0.000s > > sys 0m0.132s > > My results with your test script. > > before patch: > /usr/bin/time -p tc qdisc del dev enp1s0f0 root > real 1.63 > user 0.00 > sys 1.63 > > after patch: > /usr/bin/time -p tc qdisc del dev enp1s0f0 root > real 1.55 > user 0.00 > sys 1.54 > > > This is an obvious improvement, so I have no idea why you didn't > > catch any difference. > > We use hfsc instead of htb. I don't know whether it may cause any > difference. I can provide you with my test scripts if necessary. Yeah, you can try to replace the htb with hfsc in my script, I didn't spend time to figure out hfsc parameters. My point here is, if I can see the difference with merely 1000 tc classes, you should see a bigger difference with hundreds of thousands classes in your setup. So, I don't know why you saw a relatively smaller difference. Thanks.