Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3951129pxf; Tue, 6 Apr 2021 04:37:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzN1gE/asjBCMRfJ1CwUBiMgso+WomDNi75tbG1zTZ2RgoEKGnNO4SXYzzy2aCzGZ3xEwE6 X-Received: by 2002:aa7:c451:: with SMTP id n17mr13895506edr.197.1617709026222; Tue, 06 Apr 2021 04:37:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617709026; cv=none; d=google.com; s=arc-20160816; b=VMD8Rrf7fWtFK+vXv9emqMyo/i7CdId7/A9O7Spn7I6+VVYpqp8wGnW6thK6ioCAS7 k4QU9X/hqfNeCa90SqyXYN/lGRokDihU5L1fwgLM+tt8aSagvHDRkAU1rqFzmdta4Ftf tyaYbMFH54IlnTH83pnECD1Dgolw0xjaWYehxxtb1VspRAcmrurP7lkVHmoceBHg7t/o pQQxqHK+xlOZ0oVH2GALUInavRzR7luGJVuGl9W6+/Q901uQiG6hQYWpUMjV7R0EH9hW BXoY03Yvf3Iq2IclOtB1j04N+kEZV6aSevK7jkYWSEgxQ7Z/gyJ+olUwtLgY+Xq9K6Bs F+OQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=5jd54Vy32nNulriozySH4CudRuqSxau2vx3TWDJIPTQ=; b=RPypgH3gtFPJ09d9x2v7XgcFn4k27C76HV6aKmBSoxrvUGrRkQdbo28lvfdY3LsaY3 z8n2ui71KnyvazrhQR7/aJ2+sWPBexcpCjcOMTOLwPDLa9924ENpHvczM6Tkw6YyHXDM 614lPbExgf+gYl1J/WOs/xs1xGFUjp2k6HusBTWuHWL/Cfax7kNg/42FpZGwATzBMR7K XuAszpdVe2aDptUtxr8Zmw6HuOyp0W09rEyPGcsPWJo87prYt1EK5UnVh2p6V6jU3rZT jlOVsZJ6f60Gejf9F6a4AP/c1y5IlTJYPj221JvqEaS7hRomm4Yr1LCHPaHZNXqUBHWh 2qPw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gg25si15335020ejb.693.2021.04.06.04.36.42; Tue, 06 Apr 2021 04:37:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237938AbhDFAzv (ORCPT + 99 others); Mon, 5 Apr 2021 20:55:51 -0400 Received: from szxga03-in.huawei.com ([45.249.212.189]:3390 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232690AbhDFAzv (ORCPT ); Mon, 5 Apr 2021 20:55:51 -0400 Received: from DGGEML401-HUB.china.huawei.com (unknown [172.30.72.53]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4FDpsk12p2z5lg1; Tue, 6 Apr 2021 08:52:58 +0800 (CST) Received: from dggpemm500005.china.huawei.com (7.185.36.74) by DGGEML401-HUB.china.huawei.com (10.3.17.32) with Microsoft SMTP Server (TLS) id 14.3.498.0; Tue, 6 Apr 2021 08:55:41 +0800 Received: from [127.0.0.1] (10.69.30.204) by dggpemm500005.china.huawei.com (7.185.36.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2106.2; Tue, 6 Apr 2021 08:55:41 +0800 Subject: Re: Packet gets stuck in NOLOCK pfifo_fast qdisc To: Jiri Kosina , Hillf Danton CC: John Fastabend , Cong Wang , Paolo Abeni , Kehuan Feng , Jike Song , Jonas Bonn , Michael Zhivich , "David Miller" , LKML , "Michal Kubecek" , Netdev , Josh Hunt References: <465a540e-5296-32e7-f6a6-79942dfe2618@netrounds.com> <20200825032312.11776-1-hdanton@sina.com> <20200825162329.11292-1-hdanton@sina.com> <5f46032e.1c69fb81.9880c.7a6cSMTPIN_ADDED_MISSING@mx.google.com> <20200827125747.5816-1-hdanton@sina.com> <5f51cbad3cc2_3eceb208fc@john-XPS-13-9370.notmuch> <20210403003537.2032-1-hdanton@sina.com> From: Yunsheng Lin Message-ID: Date: Tue, 6 Apr 2021 08:55:41 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.69.30.204] X-ClientProxiedBy: dggeme702-chm.china.huawei.com (10.1.199.98) To dggpemm500005.china.huawei.com (7.185.36.74) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021/4/3 20:23, Jiri Kosina wrote: > On Sat, 3 Apr 2021, Hillf Danton wrote: > >>>>> Sure. Seems they crept in over time. I had some plans to write a >>>>> lockless HTB implementation. But with fq+EDT with BPF it seems that >>>>> it is no longer needed, we have a more generic/better solution. So >>>>> I dropped it. Also most folks should really be using fq, fq_codel, >>>>> etc. by default anyways. Using pfifo_fast alone is not ideal IMO. >>>> >>>> Half a year later, we still have the NOLOCK implementation >>>> present, and pfifo_fast still does set the TCQ_F_NOLOCK flag on itself. >>>> >>>> And we've just been bitten by this very same race which appears to be >>>> still unfixed, with single packet being stuck in pfifo_fast qdisc >>>> basically indefinitely due to this very race that this whole thread began >>>> with back in 2019. >>>> >>>> Unless there are >>>> >>>> (a) any nice ideas how to solve this in an elegant way without >>>> (re-)introducing extra spinlock (Cong's fix) or >>>> >>>> (b) any objections to revert as per the argumentation above >>>> >>>> I'll be happy to send a revert of the whole NOLOCK implementation next >>>> week. >>>> >>> Jiri >>> >> >> Feel free to revert it as the scorch wont end without a deluge. > > I am still planning to have Yunsheng Lin's (CCing) fix [1] tested in the > coming days. If it works, then we can consider proceeding with it, > otherwise I am all for reverting the whole NOLOCK stuff. Hi, Jiri Do you have a reproducer that can be shared here? With reproducer, I can debug and test it myself too. Thanks. > > [1] https://lore.kernel.org/linux-can/1616641991-14847-1-git-send-email-linyunsheng@huawei.com/T/#u >