Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp2794464ybh; Mon, 5 Aug 2019 06:59:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqzW21t/rYRU7AtISndWA1eYtQWvhy7Lp8XN0mXQLtbambEzfv8TS/2xLlupHzmJa6HZqzg8 X-Received: by 2002:a63:f959:: with SMTP id q25mr135993574pgk.357.1565013569195; Mon, 05 Aug 2019 06:59:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565013569; cv=none; d=google.com; s=arc-20160816; b=NXnJ6ryIbcU/sEbhZgzt7lrd64b+qLpGH1w9HrmCUMyPjAG+kzef625T+6TPiME24h tlHvxZcz6MC61iPqpVGuY7/Q8hYah03t3zFuSTe+EvmX5T5ribX9jGTrjc2mOUg2VH6D yx0pRcI0ptmLpwlefBkt7inw6DGu4opC37rfVkx5jLWcoi6V3qV56VK1Nqo+6mrcAG0X 7see/b5BMF+8MVhGmKIufJlFgFZzVGjxkCFKrHoMgiuQmAi7mv/gHzQXC3kOlsHjA3d9 SEarZPygn54selw68crj6WcCxUo7Euk/HrboFONQs71xPnc6cNmTHMpk5MI8Ln+iDLlL DR+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=WYw8/CsyIIlaQwFPL6bzkXMXLdhLLRjQOPAaRx584DU=; b=ErVJqOZ+CFb7KVi38UYMS/FY9Ndikjfi/ta7pgZ1hFrzdrCTtVDlrH/MTOAAk8kbJ9 FEapBjHH01iH3P6+0GoBBenThqx/t1Z0o6qq+TEoOAqF1GjNvkEYqxZM/YJdtgEamhjc /OqHEPuNovUKvhsIMZrFMe+KOyhZYtwxlUr36do6GTHyVJ3lP+nBVvmSQFLdZ5rk033E dYcMytvBRr1VhjH+Pjo3T4DU7W2MWXb8xWuOpbBgX4ivaceMwhZBr5H1g9brj2xEHAEp P74QqNBdZi3NeQTdnPNOFNA+nMudJEYxuBAd6FjjYHl76HI9toxbxkVtR2f+toz29CjX B4XQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@lunn.ch header.s=20171124 header.b=4NJXPaas; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o7si50810144pgq.459.2019.08.05.06.59.13; Mon, 05 Aug 2019 06:59:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@lunn.ch header.s=20171124 header.b=4NJXPaas; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729276AbfHEN6l (ORCPT + 99 others); Mon, 5 Aug 2019 09:58:41 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:34128 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728760AbfHEN6l (ORCPT ); Mon, 5 Aug 2019 09:58:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=WYw8/CsyIIlaQwFPL6bzkXMXLdhLLRjQOPAaRx584DU=; b=4NJXPaaslt7RJRsdw2e/74OJjF QOdM8wOeY/5x0ivcRrz2Rz65swlscRiNyfyM3IZe3Jz5JbKKYqXSunnwMl4CuoCeqLqEdG83lYodN vlZgJQqagH3Q6hpoGI0wfVjTWphygWGmHbYPCGOVQ9fTWaVNkhysxe/YLkn1suixFKbo=; Received: from andrew by vps0.lunn.ch with local (Exim 4.89) (envelope-from ) id 1hudVW-0007B7-EP; Mon, 05 Aug 2019 15:58:38 +0200 Date: Mon, 5 Aug 2019 15:58:38 +0200 From: Andrew Lunn To: Hubert Feurstein Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Richard Cochran , Vivien Didelot , Florian Fainelli , "David S. Miller" Subject: Re: [PATCH net-next v2] net: dsa: mv88e6xxx: extend PTP gettime function to read system clock Message-ID: <20190805135838.GF24275@lunn.ch> References: <20190805082642.12873-1-hubert.feurstein@vahle.at> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190805082642.12873-1-hubert.feurstein@vahle.at> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 05, 2019 at 10:26:42AM +0200, Hubert Feurstein wrote: > From: Hubert Feurstein Hi Hubert In your RFC patch, there was some interesting numbers. Can you provide numbers of just this patch? How much of an improvement does it make? Your RFC patch pushed these ptp_read_system_{pre|post}ts() calls down into the MDIO driver. This patch is much less invasive, but i wonder how much a penalty you paid? Did you also try moving these calls into global2_avb.c, around the one write that really matters? It was speculated that the jitter comes from contention on the mdio bus lock. Did you investigate this? If you can prove this true, one thing to try is to take the mdio bus lock in the mv88e6xxx driver, take the start timestamp, call __mdiobus_write(), and then the end timestamp. The bus contention is then outside your time snapshot. We could even think about adding a mdiobus_write variant which does all this. I'm sure other DSA drivers would find it useful, if it really does help. Andrew