diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2016-04-18 05:59:51 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2016-04-18 05:59:51 +0000 |
commit | 995f56ca3d6e0b6a1044260f9dfa192ae3034b48 (patch) | |
tree | 03b3c0c036ad5124ec165186070f4f9a4d42bd11 /sys/dev/ic/stivar.h | |
parent | 32622bd2941061235594b2ae27f7371d7e99bd58 (diff) |
allocate an array of entries, not pointers for the queues
this solves my memory corruption problem with a samsung sm951 in a
particular slot on a dell 2950.
hilariously, i had picked values which masked this problem on
sparc64. i randomly picked 128 as the number of entries on the
queues, and dmamem allocs get rounded up to PAGE_SIZE. on amd64 and
sparc64 this meant i was asking for 128 * 8 (sizeof pointer), or
1024 bytes, which got rounded up to 4096 and 8192 on each arch
respectively. 128 * 64 (the size of a submission queue entry) is
8192, so it worked fine on sparc64 for that reason, but randomly
blows up on amd64. the 2950 above allocated mbufs out of the page
after the submission queue, which i ended over overwriting.
anyway. let's move on.
Diffstat (limited to 'sys/dev/ic/stivar.h')
0 files changed, 0 insertions, 0 deletions