From owner-freebsd-stable@FreeBSD.ORG Sat Feb 26 07:13:12 2005 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4BB9416A4CE for ; Sat, 26 Feb 2005 07:13:12 +0000 (GMT) Received: from mail10.syd.optusnet.com.au (mail10.syd.optusnet.com.au [211.29.132.191]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7785443D54 for ; Sat, 26 Feb 2005 07:13:11 +0000 (GMT) (envelope-from PeterJeremy@optushome.com.au) Received: from cirb503493.alcatel.com.au (c211-30-75-229.belrs2.nsw.optusnet.com.au [211.30.75.229]) j1Q7D9r9016503 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Sat, 26 Feb 2005 18:13:10 +1100 Received: from cirb503493.alcatel.com.au (localhost.alcatel.com.au [127.0.0.1])j1Q7D97l094946 for ; Sat, 26 Feb 2005 18:13:09 +1100 (EST) (envelope-from pjeremy@cirb503493.alcatel.com.au) Received: (from pjeremy@localhost) by cirb503493.alcatel.com.au (8.12.10/8.12.9/Submit) id j1Q7D8JD094945 for freebsd-stable@freebsd.org; Sat, 26 Feb 2005 18:13:08 +1100 (EST) (envelope-from pjeremy) Date: Sat, 26 Feb 2005 18:13:08 +1100 From: Peter Jeremy To: freebsd-stable@freebsd.org Message-ID: <20050226071308.GN57256@cirb503493.alcatel.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.4.2i Subject: Excessive delays due to syncer kthread X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Feb 2005 07:13:12 -0000 I am trying to do some video capture and have been losing occasional fields. After adding some debugging code to the kernel, I've found that the problem is excessive latency between the hardware interrupt and the driver interrupt - the hardware can handle about 1.5msec of latency. Most of the time, the latency is less than 20µsec but but I'm seeing up to 8 msec occasionally. In virtually all cases where there is a problem, curproc at the time of the hardware interrupt is syncer. (I had one case where there was another process, but it had died by the time I went looking for it). The interrupt is marked INTR_TYPE_AV so it shouldn't be being delayed by other threads. (I can't easily make it INTR_FAST because it needs to call psignal(9)). The system is an Athlon XP-1800 with 512MB RAM and 2 ATA-100 disks running 5.3-RELEASE-p5. It has a couple of NFS exports but doesn't import anything. There's nothing much running apart from ffmpeg capturing the video and a process capturing my kernel debugging output. Apart from 4 files being sequentially written as part of my capture and cron regularly waking up to go back to sleep, there shouldn't be any filesystem activity. I tried copying a couple of large files and touching lots of files but that didn't cause any problems. Can anyone suggest why syncer would be occasionally running for up to 8 msec at a time? Overall, it's not clocking up a great deal of CPU time, it just seems to grab it in large chunks. Peter