DragonFly BSD
DragonFly kernel List (threaded) for 2003-11
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: ATA errors.


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Fri, 28 Nov 2003 12:35:13 -0800 (PST)

::I found that there's a place where ATA driver silently falls back to
::BIOSPIO mode even when bootverbose is true. In ad_start(), if the
::call to ata_dmaalloc fails, adp->device->mode is set to ATA_PIO, but
::there's no ata_prtdev() around there, that's why we don't see any
::`fallback' messages. I'm not sure why ata_dmaalloc() failed.
::Anyway, attached is a patch to add ata_prtdev(), and add a knob
::hw.ata.panic_on_dma_failure(default: 0).
:
:    Ah, Excellent.  It's because it is using M_NOWAIT and the allocation
:    can fail if kernel_map is locked.  This is just bad algorithm design
:    because allocations with M_NOWAIT can fail even on FreeBSD-4.x boxes.
:
:    I will encapsulate the dmatab freeing code and make it unconditional.
:
:					-Matt

    Damn.  This is not going to be as easy to fix as I thought... the ATA
    code is seriously broken.  It uses M_NOWAIT all over the place for
    things that just have no business being M_NOWAIT.

    DragonFly will generate NULL returns for M_NOWAIT requests more often
    then FreeBSD-4.x due to blockages on kernel_map (FreeBSD-4.x has kmem_mem
    for allocations when kernel_map is locked).

					-Matt
					Matthew Dillon 
					<dillon@xxxxxxxxxxxxx>



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]