Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp557458ybl; Wed, 21 Aug 2019 01:49:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqwmCRuvcJIXiZgiDDK9dMU+4r++/JDTKuoJvPdKG6muDE0hpkVheDNC1E6v9bU1FtyS1Ony X-Received: by 2002:a17:902:fe14:: with SMTP id g20mr30770409plj.54.1566377395972; Wed, 21 Aug 2019 01:49:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566377395; cv=none; d=google.com; s=arc-20160816; b=ezyn/Hjtr6+7PooUP5aBnuDZ4Doa918NPAbipP9WtEJ9dwsWRTa8k32fzdsc6ZCLii 2kjsplCUHGK0RUvmQJhY2K1+4KgqKSWuqooQFsH3HMGk9JtVsVGrfz+hdTS2Znc2t5ZM zZrLoQDo+oYQtGd/bHLD3rOfSUoHzsxfK9LZUSIdB/Bm0LMo4vQLq2VJLNF1+to7HICr zhpks4QEupyy6UvNsL3SDz0Yjrhg+UGVHACZoRw+GuzcoWdnuoucKfF9WzPnCiadHxYV /SAbl7nGsS0bVyxiVUKBq1lNybTlPASZO2238nDYvy+zXXVVeItwQrx3oz6G1a1F1Y2R GfFA== 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; bh=Q2lg+5apZ7QB02a+JErb1mdQq2fke+xCDwUAcWmBcvQ=; b=djHov13vHfAg+OoigVmmPmeyYg9/1U9BwSZ0RAqiHvEe6RCRLt1myccOyXdiOxatO2 +OK9ekbkGJ3m+UrTf6RCsP8pNrdkPUhhgekNg9qPkMkwoQ6zhPzQG93GYObW9m0xH8G+ Vd4DUYAS3psKnIewDWEnWqbI54mp5YAwavmkrijhJ0VQZE0lESNEtOZHaDl03/K4o2MT wO+bZxn+6Y35qZN8Zyt6Dcj17ysFEYkhbemrJ6w9el2nS9qmttqPAUmkTr0GKJrCOm47 MTbv72pZ6WkfsADbK5VHbqhaiVWsQa0uSEvCWq73ibYey0z9QMLD/96sCr1TmASXZIsk QB2w== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 66si14381625plc.428.2019.08.21.01.49.40; Wed, 21 Aug 2019 01:49:55 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726899AbfHUIHO (ORCPT + 99 others); Wed, 21 Aug 2019 04:07:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:1773 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726317AbfHUIHO (ORCPT ); Wed, 21 Aug 2019 04:07:14 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2148D7F742; Wed, 21 Aug 2019 08:07:14 +0000 (UTC) Received: from localhost (holly.tpb.lab.eng.brq.redhat.com [10.43.134.11]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 482E65F74; Wed, 21 Aug 2019 08:07:12 +0000 (UTC) Date: Wed, 21 Aug 2019 10:07:09 +0200 From: Miroslav Lichvar To: Hubert Feurstein Cc: Andrew Lunn , netdev , lkml , Richard Cochran , Florian Fainelli , Heiner Kallweit , Vladimir Oltean , "David S. Miller" Subject: Re: [PATCH net-next v3 2/4] net: mdio: add PTP offset compensation to mdiobus_write_sts Message-ID: <20190821080709.GO891@localhost> References: <20190820084833.6019-1-hubert.feurstein@vahle.at> <20190820084833.6019-3-hubert.feurstein@vahle.at> <20190820094903.GI891@localhost> <20190820142537.GL891@localhost> <20190820152306.GJ29991@lunn.ch> <20190820154005.GM891@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.12.0 (2019-05-25) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.71]); Wed, 21 Aug 2019 08:07:14 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 20, 2019 at 06:56:56PM +0200, Hubert Feurstein wrote: > Am Di., 20. Aug. 2019 um 17:40 Uhr schrieb Miroslav Lichvar > > I think a large jitter is ok in this case. We just need to timestamp > > something that we know for sure happened after the PHC timestamp. It > > should have no impact on the offset and its stability, just the > > reported delay. A test with phc2sys should be able to confirm that. > > phc2sys selects the measurement with the shortest delay, which has > > least uncertainty. I'd say that applies to both interrupt and polling. > > > > If it is difficult to specify the minimum interrupt delay, I'd still > > prefer an overly pessimistic interval assuming a zero delay. > > > Currently I do not see the benefit from this. The original intention was to > compensate for the remaining offset as good as possible. That's ok, but IMHO the change should not break the assumptions of existing application and users. > The current code > of phc2sys uses the delay only for the filtering of the measurement record > with the shortest delay and for reporting and statistics. Why not simple shift > the timestamps with the offset to the point where we expect the PHC timestamp > to be captured, and we have a very good result compared to where we came > from. Because those reports/statistics are important in calculation of maximum error. If someone had a requirement for a clock to be accurate to 1.5 microseconds and the ioctl returned a delay indicating a sufficient accuracy when in reality it could be worse, that would be a problem. BTW, phc2sys is not the only user of the ioctl. -- Miroslav Lichvar