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=-5.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 A80EBC43331 for ; Tue, 31 Mar 2020 12:46:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2654920848 for ; Tue, 31 Mar 2020 12:46:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="unknown key version" (0-bit key) header.d=tlapnet.cz header.i=@tlapnet.cz header.b="Ozdk8i6E" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730785AbgCaMqO (ORCPT ); Tue, 31 Mar 2020 08:46:14 -0400 Received: from mail-qk1-f195.google.com ([209.85.222.195]:41253 "EHLO mail-qk1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730742AbgCaMqO (ORCPT ); Tue, 31 Mar 2020 08:46:14 -0400 Received: by mail-qk1-f195.google.com with SMTP id q188so22734381qke.8 for ; Tue, 31 Mar 2020 05:46:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tlapnet.cz; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=nfaqgGEWFYgGX2gzXoxYE0BXb10XcZCgKGgC1DixpFk=; b=Ozdk8i6EuyQIkmcjZBcXBWrKoiOqDeFd1is9FB2PT8Gy38S1/em6FWO6RHpaXswLny 4414HUTonyGSns/1RhP+cic7mRHY2F0JgxbsIp6vuhKZP4tswvJnFhDm1IEiD7qX6vLL NsFITB431crvN2Y9xAlVslLQ37sAxhRFWSF5c0vkKzFEXMDH1p4fV/jSy1ixrSY4LQFY li5C7Y4kNWRaztYti00LmwxwkO5LQULwzgqdgn+V+IRGxVNHjMCIsjdgdhoPxWhDWNeO 2YxNykGFS7eAcyEMa+kfZuMNyCvgATEEOGo+5V5RKlLHthdhH+77FsrUPlnrOvHa3tgm dQWQ== 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=nfaqgGEWFYgGX2gzXoxYE0BXb10XcZCgKGgC1DixpFk=; b=A7cBbMpG9k3GJmcYDg8ov/XenVZmOKcK/k/Pee66SFt/MNwRhm50ZDFKKZcKvdaLRO fMWVI9pGiMQhW4lk/DsR31mQjKfS4EFvV3IHKCqvwRohbt8+kmZHMDt4ls3C3dfRbWx1 ErGt5vQnsB8Ij/+xQHjHM6kGuHrRYb1i+yO2QROS9wex7olb2CNEOQk27cDsWpmkc3qe a0kqm/2tOd+zXXergHeOj8v5savqtYlbf0mveccc40e8SSppPhhenjTNMBOUPSy7sOgu kyTsfBn78n082E7Yr9pkl6jOXGFCPBjF8pYNI2wxitA60S3c7IaFPDQT9rEXbDQjzU9O LurQ== X-Gm-Message-State: ANhLgQ1i2zCSl7bCY8mLT0Qvpn/H6zsHksFOzcVJC3uXYOfNYmfVcXZ/ hmZyn64+ETeeA/rF/OtTHzRwTbkhoqHl+OsTBiqEea11kLM= X-Google-Smtp-Source: ADFU+vvmpT0CM1O2QUTIYCYkUcQC+n4i3LKFxI9ddPzhOKyCr46Pcg/TpqK7eN9uf+f5obQGM1FRnvEXIawuyHNxPns= X-Received: by 2002:a37:9e05:: with SMTP id h5mr4526562qke.71.1585658772930; Tue, 31 Mar 2020 05:46:12 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: =?UTF-8?Q?V=C3=A1clav_Zindulka?= Date: Tue, 31 Mar 2020 14:46:01 +0200 Message-ID: Subject: Re: iproute2: tc deletion freezes whole server To: Cong Wang 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, Mar 31, 2020 at 8:00 AM Cong Wang wrote: > > On Sat, Mar 28, 2020 at 6:04 AM V=C3=A1clav Zindulka > wrote: > > > > On Fri, Mar 27, 2020 at 11:35 AM V=C3=A1clav Zindulka > > wrote: > > > > > > Your assumption is not totally wrong. I have added some printks into > > > fq_codel_reset() function. Final passes during deletion are processed > > > in the if condition you added in the patch - 13706. Yet the rest and > > > most of them go through regular routine - 1768074. 1024 is value of i > > > in for loop. > > > > Ok, so I went through the kernel source a little bit. I've found out > > that dev_deactivate is called only for interfaces that are up. My bad > > I forgot that after deactivation of my daemon ifb interfaces are set > > to down. Nevertheless after setting it up and doing perf record on > > ifb0 numbers are much lower anyway. 13706 exits through your condition > > added in patch. 41118 regular exits. I've uploaded perf report here > > https://github.com/zvalcav/tc-kernel/tree/master/20200328 > > > > I've also tried this on metallic interface on different server which > > has a link on it. There were 39651 patch exits. And 286412 regular > > exits. It is more than ifb interface, yet it is way less than sfp+ > > interface and behaves correctly. > > Interesting, at the point of dev_deactivate() is called, the refcnt > should not be zero, it should be at least 1, so my patch should > not affect dev_deactivate(), it does affect the last qdisc_put() > after it. > > Of course, my intention is indeed to eliminate all of the > unnecessary memset() in the ->reset() before ->destroy(). > I will provide you a complete patch tomorrow if you can test > it, which should improve hfsc_reset() too. > > Thanks. Sure, I'll test it and I'm looking forward to it. :-) Thank you for all your help and effort. I appreciate it a lot.