Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: USB umass hard drive "failed to create xfers" when attaching
On 2020/02/17 21:33, Nick Hudson wrote:
> On 17/02/2020 16:23, Paul Goyette wrote:
> [...]
>
>>> More info...
>>>
>>> First, this is on a amd64 system, witwh 8core/16thread and 128GB of RAM.
>>>
>>> On IRC it was suggested (thanks, maya!) that the error message might be
>>> related to memory fragmentation. I didn't believe it (given how much
>>> RAM I have), but a quick check with top(1) showed that I had more than
>>> 100GB of 'file cache' active. So, I unmounted all my development trees
>>> (to force the cache to get flushed). Sure enough, I am now able to
>>> successfully mount the USB drive!
>>>
>>> So, sounds like "something somewhere isn't quite right (tm)". I would
>>> have expected a memory allocation failure to automatically trigger some
>>> mechanism to reclaim some of the file cache...
>>
>> And, based on more discussion, this would seem to be a kernel virtual
>> address fragmentation issue, and not related to physical memory being
>> available. The concensus on IRC is that this is a bug in the xhci(4)
>> driver.
>
> Yes and no.
>
> xhci could do better and support multiple DMA segments, but uvm could
> also help.
To access each DMA segment in usb_dma_t *dma, should it be processed
like this?
for (i = 0; i < dma->udma_block->nsegs; i++) {
bus_dma_segment_t *ds = &dma->udma_block->map->dm_segs[i];
process_segment(ds->ds_addr, ds->ds_len);
}
>
> Nick
Home |
Main Index |
Thread Index |
Old Index