Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Jan 2004 19:55:05 -0500
From:      Martin Cracauer <cracauer@cons.org>
To:        hardware@freebsd.org
Subject:   ATA and readahead on DVD drive, ATA_C_F_ENAB_RCACHE
Message-ID:  <20040108195505.A15849@cons.org>

next in thread | raw e-mail | index | archive | help
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 <JLMS XJ-HD165H> 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 <cracauer@cons.org>   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.


Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040108195505.A15849>