Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp330295pxu; Fri, 23 Oct 2020 01:41:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxcB7JbRp1NzkHb5iA7AOUYcgql9btXJcr9j/++YQbhT/uCLqU1ozanML/HZkFd0Ttzn4lq X-Received: by 2002:a05:6402:3184:: with SMTP id di4mr1201008edb.362.1603442498435; Fri, 23 Oct 2020 01:41:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603442498; cv=none; d=google.com; s=arc-20160816; b=dVY+TLRZLcqj9nLcgXECeYR67H+7/r8nAl+9A8fWNJlZdCuz5vI5GWtaiAZVaxuyO1 VMxFjwqTqMrrHSB3uVdEct4dXNDaM3iCZ1LXXlJwlZqSj438bIGmKxZNOy1kai090GEy HOkcsIllLiUG0ADQU/mPUE+xc/zzwXPH9VFEZoGa1qXbjZwWxjSerHeeoPUgz1SbIPXU n+sFgvtb+HRLagD6CNUI5/nVCie8hMI/hItVWdYcxv4dgO4tw+/c6sOhr6icCL1Q59r/ ffng8rWjHxmzpZMHSWG02YnbOKc2LxA6o5ocUh07nNY1ymLLfVkgvfcFCA4cK5doqpmn Gt1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=sOGpUE7QbawtCGrwAcmsggKP+64Az6x+qEx0mrarrho=; b=J9ZuLrV7ex2SSIsOwJcmS/Vs13qD+ZmC++J7wmWlaIGlEV0cPN9CadmkVd3GSfJ/Ip oFrJau64KVvKwSUeAS706ERmzjzU9hlnltZ7rlKBdObLw3MzVnQnOpdhLa/SZXbrPWC+ 4QbbbL6Az0mbjy3GmchpYuByuVmk3+hQ+E9H9aCHegZrJ9vEEkBzsJ+S7dV8Q5rTTuM8 QRKdtw6moe1toJ309U4NcpNRoXG6tS4MeWtN+9IWFMyeymA+oWyjUShxQu2Vw3umoK5B BN7Q9IcV5OUIUSLjzPCwpEU2cmKtDA8BTDFXYc/Euyv5b74y/2XYe4njtjJhsx4jmXav vkIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ImXHeoN1; 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 z8si411809ejp.314.2020.10.23.01.41.15; Fri, 23 Oct 2020 01:41:38 -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=default header.b=ImXHeoN1; 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 S460716AbgJWIju (ORCPT + 99 others); Fri, 23 Oct 2020 04:39:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:57726 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S460709AbgJWIju (ORCPT ); Fri, 23 Oct 2020 04:39:50 -0400 Received: from mail-qv1-f50.google.com (mail-qv1-f50.google.com [209.85.219.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BA01422253; Fri, 23 Oct 2020 08:39:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1603442389; bh=VvRSe/OoqsH6RWGRZu9ZjCYTv4OyRkDtBy9Tp5f+wyM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=ImXHeoN1ZKHEd/w7JhcCdvImXbJuvOX4ynCQAR4ku/jRK+hDMf2kn5k3NiR7MazIl QXhvZ5LF+658kVs8Kx2ja2RFsEKb5EL/2uhZHlWlvaLt4SUBqAqFkAGFoKSkWMZSR0 lfSF6PyCATPOiwVtUyEI7hguvwsECyXG2QnK0rvE= Received: by mail-qv1-f50.google.com with SMTP id cv1so305657qvb.2; Fri, 23 Oct 2020 01:39:49 -0700 (PDT) X-Gm-Message-State: AOAM533x0FUQrqbrfXAy9loujORhFI0svUQ3dZljvhmQzgUchnKWpDSH Br+NOF2wKyhw5nfhgEk2bhYLw1DEa2n7/FrIvoU= X-Received: by 2002:ad4:4203:: with SMTP id k3mr1182611qvp.8.1603442388461; Fri, 23 Oct 2020 01:39:48 -0700 (PDT) MIME-Version: 1.0 References: <20201019073908.32262-1-dylan_hung@aspeedtech.com> <20201019120040.3152ea0b@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <32bfb619bbb3cd6f52f9e5da205673702fed228f.camel@kernel.crashing.org> In-Reply-To: From: Arnd Bergmann Date: Fri, 23 Oct 2020 10:39:32 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] net: ftgmac100: Fix missing TX-poll issue To: Benjamin Herrenschmidt Cc: Arnd Bergmann , Dylan Hung , Jakub Kicinski , Joel Stanley , "David S . Miller" , "netdev@vger.kernel.org" , Linux Kernel Mailing List , Po-Yu Chuang , linux-aspeed , OpenBMC Maillist , BMC-SW Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 22, 2020 at 9:41 AM Benjamin Herrenschmidt wrote: > On Wed, 2020-10-21 at 14:11 +0200, Arnd Bergmann wrote: > > > > At the moment, the only chips that need the heavy barrier are > > > omap4 and mstar_v7, and early l2 cache controllers (not the one > > > on Cortex-A7) have another synchronization callback that IIRC > > > is used for streaming mappings. > > .../... > > > > Obviously, adding one of these for ast2600 would slow down every > > > mb() and writel() a lot, but if it is a chip-wide problem rather than > > > one isolated to the network device, it would be the correct solution, > > > provided that a correct code sequence can be found. > > I'm surprised that problem doesn't already exist on the ast2400 and > 2500 and I thus worry about the performance impact of such a workaround > applied generally to every MMIO writes.... > > But we did kill mmiowb so ... ;-) The real cost would have to be measured of course, and it depends a lot on how it's done. The read-from-uncached-memory as in the 1/4 patch here seems fairly expensive, the mstarv7_mb() method (spinning on an mmio read) seems worse, but the omap4 method (a posted write to a mmio address in the memory controller to enforce a barrier between the two ports) doesn't seem that bad and would correspond to what the chip should be doing in the first place. Arnd