From owner-freebsd-hardware@FreeBSD.ORG Thu Jan 8 16:55:08 2004 Return-Path: Delivered-To: freebsd-hardware@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0B5A216A619 for ; Thu, 8 Jan 2004 16:55:08 -0800 (PST) Received: from schlepper.zs64.net (schlepper.zs64.net [212.12.50.230]) by mx1.FreeBSD.org (Postfix) with ESMTP id 52CBD43D46 for ; Thu, 8 Jan 2004 16:55:06 -0800 (PST) (envelope-from cracauer@schlepper.zs64.net) Received: from schlepper.zs64.net (schlepper [212.12.50.230]) by schlepper.zs64.net (8.12.10/8.11.1) with ESMTP id i090t5Ei015915 for ; Fri, 9 Jan 2004 01:55:05 +0100 (CET) (envelope-from cracauer@schlepper.zs64.net) Received: (from cracauer@localhost) by schlepper.zs64.net (8.12.10/8.12.9/Submit) id i090t5o8015914 for hardware@freebsd.org; Thu, 8 Jan 2004 19:55:05 -0500 (EST) Date: Thu, 8 Jan 2004 19:55:05 -0500 From: Martin Cracauer To: hardware@freebsd.org Message-ID: <20040108195505.A15849@cons.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Subject: ATA and readahead on DVD drive, ATA_C_F_ENAB_RCACHE X-BeenThere: freebsd-hardware@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: General discussion of FreeBSD hardware List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2004 00:55:08 -0000 Hi, Soeren, other ATA people, are there any readahead options or other buffering that I can enable in the ATA driver, for a DVD drive? I see there is a call like this in the source: if (ata_command(atadev, ATA_C_SETFEATURES, 0, 0, ATA_C_F_ENAB_RCACHE, ATA_WAIT_INTR)) ata_prtdev(atadev, "enabling readahead cache failed\n"); Can I trigger that call manually from userland? How can I know whether this call have been executed at all? Long story: On my FreeBSD-4.9 machine I cannot directly play DVDs, the drive is too slow (under FreeBSD), but only occasionally, as in hickups. I can watch DVDs fine with `mplayer -cache 8192`, which will buffer up 8 MB and then playing out of the buffer. However I would prefer to use Xine which doesn't have the buffer option and stutters every few seconds. I can proof that the long-term bandwidth of the drive is enough and that it is actally the drive that is the problem, because this works without stutter: play_title 1 1 | cstream -B 8m -c2 | xine - [ play_title is part of libdvdread and dumps the mpeg streamto stdout, cstream is a stream tool with buffering option ] The same hardware (CPU, Mainboard, IDE-Controller, DVD drive) played fine under Linux with the same version of xine. So I think it is a reasonable assumption that the difference here is that Linux buffers on the driver level (or in the drive) and FreeBSD does not. Hardware: - P3-based Celeron 1300 MHz - P2B mainboard - this drive is on the PIIX4 on-mainboard controller - 384 MB RAM - G-400 32 MB - acd0: DVD-ROM at ata0-slave UDMA33 - (full dmesg on http://wavehh.dyndns.org/tmp/dmesg.boot) On the other channel of the PIIX4 controller is a acd1: CD-RW <32X10> at ata1-master WDMA2 Could the presense of that be responsible for the problems on the first drive? Martin -- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Martin Cracauer http://www.cons.org/cracauer/ No warranty. This email is probably produced by one of my cats stepping on the keys. No, I don't have an infinite number of cats.