Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1506671pxf; Fri, 2 Apr 2021 12:28:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwzyeDy7qjV2ZDrWv1xVhqMbIsf1DpItbFP/NiaQFMN0CcxfLDhKv1O4O+c6Vpii1AjJadE X-Received: by 2002:a02:ca50:: with SMTP id i16mr14373656jal.5.1617391697818; Fri, 02 Apr 2021 12:28:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617391697; cv=none; d=google.com; s=arc-20160816; b=BBHniRTXXwye81oTsmxle+FJhMenWrASS5BcERjllQGUYAyhoe2NG5M6ettFCZf3vi IfdJxg7MOckMDGZchWxf5lh9yZ8+aF8cmQN7pMVNjDB+NMJjaO3jiehGrFBYbS7a6pcm PvZoSRor8exxYmUms8Nexe/d/pp3zhjq8QbzWFGbOhWM+VevKJ3R6csnfhFKn2MS6mRO Dgy+QmOPV9EvFkKVzoTJiiios2rqc+jkMqIuP+qUyzxO0r3BDG/6qdV8EF1iFoZCyChh OEat3mOOJqVH2x9nOUY4H2Ozv/mZDU0nWSGNDe5UQa6w+6vVdgqqPvZ2iq5F0ZUCPc1A EJqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=k8u9Su5nSTYIWv0zcRXlODbAgU9ZirKhUaXRu6bksCE=; b=YMkSll5/jXSINXqxz114um+C1ycv6I5pL8yktGcI+QVL6wZ1fYI85KqjE+6M1soIe4 pdHwawVn+chT4FEkDn5tPzX1jz//Bd9JLH3PGs7WrUcjiSJ18FRVSU+K59HTumjQMy0J R2U8S2jE4dkUW8N+mIDvV9YowIEXWfDSY2AinLI3b9i7BHTOHPh/NwJGXMX84BxTFGMl 9ZsdKkLki5FQI6e7S0zVhovXnD8PEIcSBkzixLwFM0cjxr4nWjHbH3G3LmgYaygtXE95 3QGeVRjKtVfoBufOD8lN1gDF5c1JN9BQy76DlaBId/CP3+327UCnLhdHlp4RCrm3m9ma mZ/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lrH9MHja; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o13si8903038iou.15.2021.04.02.12.28.03; Fri, 02 Apr 2021 12:28:17 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lrH9MHja; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236485AbhDBT0J (ORCPT + 99 others); Fri, 2 Apr 2021 15:26:09 -0400 Received: from mail.kernel.org ([198.145.29.99]:36242 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236255AbhDBT0C (ORCPT ); Fri, 2 Apr 2021 15:26:02 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C3018600D3; Fri, 2 Apr 2021 19:25:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1617391561; bh=Ur/RPoLJAFNQ/xo2Az7wZnPpTvyn9qFxiOG6Tvgto4g=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=lrH9MHjapHs5Z13vdaZwdG2XD8TgjL8lBjyuLrGWX8mgyfBHW1ok+EJqooW/fN6M+ lvaV4XoalHG2L8tELTgrfSERJfwR6YSD+mNiI0XqWWig2I3GLvb1aEhTqrx5wgwt24 QBb6m6+tOXz0RT2a3NINiEa9AgtnD/FYsYlvLbYx6Pwq4X5rXxz3/Vwnr2oVzXUPIi zAvxLWe9kaeJVsyrDAE2NdjPfIxOeeExM9aaCSFYpDvgtejq+31/aNrtpYZ24ExIgD yuwvo73gDOCvptd18e3AESfzz2eSgY3zpW7BhI+5Xc3qPp+1+sT6oXPxWsJPna5DQT 20XxkPm2Cd6vA== Date: Fri, 2 Apr 2021 21:25:56 +0200 (CEST) From: Jiri Kosina To: John Fastabend cc: Cong Wang , Paolo Abeni , Kehuan Feng , Hillf Danton , Jike Song , Josh Hunt , Jonas Bonn , Michael Zhivich , David Miller , LKML , Michal Kubecek , Netdev Subject: Re: Packet gets stuck in NOLOCK pfifo_fast qdisc In-Reply-To: <5f51cbad3cc2_3eceb208fc@john-XPS-13-9370.notmuch> Message-ID: References: <465a540e-5296-32e7-f6a6-79942dfe2618@netrounds.com> <20200822032800.16296-1-hdanton@sina.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> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 3 Sep 2020, John Fastabend wrote: > > > At this point I fear we could consider reverting the NOLOCK stuff. > > > I personally would hate doing so, but it looks like NOLOCK benefits are > > > outweighed by its issues. > > > > I agree, NOLOCK brings more pains than gains. There are many race > > conditions hidden in generic qdisc layer, another one is enqueue vs. > > reset which is being discussed in another thread. > > 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. Thanks, -- Jiri Kosina SUSE Labs