From owner-freebsd-questions@FreeBSD.ORG Sun Mar 21 07:41:27 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C9A6016A4CE for ; Sun, 21 Mar 2004 07:41:27 -0800 (PST) Received: from febo.com (rrcs-central-24-123-66-139.biz.rr.com [24.123.66.139]) by mx1.FreeBSD.org (Postfix) with ESMTP id A262443D2F for ; Sun, 21 Mar 2004 07:41:27 -0800 (PST) (envelope-from jra@febo.com) Received: from ip007.febo.com ([192.168.1.7] helo=febo.com ident=jra) by febo.com with esmtp (Exim 3.36 #1 (Debian)) id 1B554p-000248-00 for ; Sun, 21 Mar 2004 10:41:27 -0500 Message-ID: <405DB7A6.6000508@febo.com> Date: Sun, 21 Mar 2004 10:41:26 -0500 From: John Ackermann N8UR User-Agent: Mozilla Thunderbird 0.5 (X11/20040208) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: SIO flags -- setting and checking X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Mar 2004 15:41:27 -0000 Hi -- I am running FreeBSD 4.9 on a system whose sole purpose in life is to be an NTP time server. It has two reference clocks attached that communicate via serial ports. I've built my own kernel to incorporate the "PPS" API and kernel timekeeping discipline (no patches of my own; just enabling options). To get maximum performance from these clocks, it's important to minimize the jitter in the serial data stream. To do that, I've also modified the kernel options to set flags 0x02 (disable FIFO) on the two sio ports that talk to my clocks; this lowers jitter by letting the characters get out of the UART one at a time, rather than in bunches. I am getting the expected results on one of the serial ports and one of the clocks, but the other port is not showing the performance I would expect. Therefore, I'm trying to troubleshoot (and by the way, when I'm finished this info is going into the NTP Wiki which serves as an FAQ). I have three questions: First, on a 4.9 system is there a way to change the sio flags short of rebuilding the kernel? I know there's a mechanism for 5.0, but I haven't been able to figure out if there's an easier way for my system. Second, is there a way short of looking at the kernel configuration files to tell what flags are actually set on an sio port? Third, is there any other tweaking that might improve the jitter in the serial data stream. Note that actual latency isn't a problem as I can compensate for that, but smoothness of the data flow is the key thing. Buffers are bad for this application! Thanks! John Ackermann jra@febo.com