Comment 41 for bug 1475166

Revision history for this message
kashyap (kashyap-desai) wrote :

@ Bryan -

1. This is an issue with Avago Driver. Driver code snippet -

    instance->max_sectors_per_req = instance->max_num_sge *
                        PAGE_SIZE / 512;
    if (tmp_sectors && (instance->max_sectors_per_req > tmp_sectors))
        instance->max_sectors_per_req = tmp_sectors;

Current Driver count max_sectors based on PAGE_SIZE. This is wrong. We will fix and send patch to upstream.

On OPAL setup, PAGE_SIZE is 64K, so we will send max_sectors to OS = 8192. This is higher than FW expect. FW is just 1M capable.
Now kernel has some check at block layer to pick min of two values. One Driver provided and other BLK defaults.

Ubuntu 14.x kernel might be bringing down value of max_hw_sectors_kb to 1024, but 15.4 kernel keep max_hw_sectors_kb to 4096.

Driver fix is required and root cause is PAGE_SIZE is more than 4K. Driver will break the moment PAGE_SIZE is more than 4K w.r.t max_sectors value.

Using max_sectors module parameter of driver, you can reduce the value but can not increase that value. It can solve this problem. So if you/customer is looking for quick resolution use max_sectors module parameter of megasraid_sas driver.

Add below entry in grub

megaraid_sas.max_sectors=512

Thanks, Kashyap