Re: SCSI tape buffer allocation hitting memory allocation

Steve Dodd (dirk@loth.demon.co.uk)
Fri, 12 Feb 1999 21:45:23 +0000


Hi,

On Fri, Feb 12, 1999 at 01:18:39PM -0800, Simon Kirby wrote:

> Looking at the code, it seems to do this when scsi_init_malloc() returns
> NULL (fails). So, I hit alt-sysreq...Sure enough, there didn't appear to
> be any large areas free. I remembered that I saw that the floppy driver
> once spat out that it was resorting to virtual DMA, so I thought that
> maybe I would be able to convert scsi_init_malloc() to fall back to use
> vmalloc() if allocation in physical memory fails. I don't know if this

Erm, if the pages aren't contiguous in physical memory (=vmalloc), you can't
DMA to them in one go, can you? (Not knowing much about it). Surely the code
would use vmalloc() by default otherwise. Maybe the floppy driver does
something funky to handle the vmalloc()'d memory, but on a SCSI device I'd
imagine the performance overhead would be such that it'd be better to just
drop the DMA buffer size back.

> And I was happy...But then I ran the exact same command again and the
> machine froze hard (even interrupts were dead -- no sysreq). So, is this
> not possible? Is there another workaround that could be done? Is there
> just a dumb bug in my patch (attached)?

I'm guessing your SCSI controller just DMA'd over the top of something
critical (kernel code, page table, ...).

S.

-- 
%DCL-MEM-BAD, bad memory
VMS-F-PDGERS, pudding between the ears

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/