> -----Original Message----- > From: Martin K. Petersen [mailto:martin.petersen@xxxxxxxxxx] > Sent: Wednesday, April 18, 2018 10:43 PM > To: volker.schwicking@xxxxxxxxxxx > Cc: linux-scsi@xxxxxxxxxxxxxxx; Kashyap Desai; Sumit Saxena > Subject: Re: MegaCli fails to communicate with Raid-Controller > > > Volker, > > > after our latest kernel-update from 4.6. to 4.14.14 we are having > > trouble getting data out of our LSI-raid-controllers using the > > megacli-binary. > > > > For every execution of the megacli-binary a line shows up in the > > kern.log > > > > ### > > [547216.425556] megaraid_sas 0000:03:00.0: Failed to alloc kernel SGL > > buffer for IOCTL ### > > Well, that explains why things aren't working. The kernel is unable to allocate > a DMA buffer for the ioctl. > > There really hasn't been any changes to this code since 4.6. The only thing > that springs to mind is some mucking around with the DMA mask in a previous > megaraid update. But given how old your controller is, I'd expect this mask to > be 32 bits both before and after. I think you may see issue with 4.6 kernel as well. This is run time memory allocation failure. Older controller used 32 bit consistence DMA mask, so possibility of memory allocation failure is high compare to 64 bit consistence DMA mask. Newer controller has fix in this area, but you are using gen-1 controller. ("Dell R710, MegaRAID SAS 1078"). There can be a two possibilities. 1. This is actual memory allocation failure due to system resource issue. 2. IOCLT provided large memory length in iov and dma buffer allocation from below API failed due to large memory chunk requested. kbuff_arr[i] = dma_alloc_coherent(&instance->pdev->dev, ioc->sgl[i].iov_len, &buf_handle, GFP_KERNEL); Can you change driver code *printk* to dump iov_len ? Just to confirm. One wild guess - You are using Xen flavor, which will reserve less memory for Dom0 and there may be some way to increase dom0 memory. Can you tune that as well and see ? I am not sure how to do that in your case, but in Citrix we used to see such issue frequently compare to *default* Linux. Providing some tuning in grub increase the dom0 memory and that make things better compare to default settings. > > Kashyap? Sumit? > > -- > Martin K. Petersen Oracle Linux Engineering