[CORE,HW] replace using of Paged pool by NonPaged one. [mlnx: 4836]
authorleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Mon, 26 Oct 2009 10:05:59 +0000 (10:05 +0000)
committerleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Mon, 26 Oct 2009 10:05:59 +0000 (10:05 +0000)
We see from time to time BSODs at shutdown times while a hard traffic load.
It can be attributed to the fact that some of the structured used in PnP and Power Management are allocated in Paged Pool.
As far as these structures are of little size it is safer to use for them always NonPagedPool.
It makes the driver more robust.

git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@2510 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

core/bus/kernel/bus_iou_mgr.c
core/bus/kernel/bus_port_mgr.c
core/complib/kernel/cl_pnp_po.c
core/iou/kernel/iou_ioc_mgr.c
etc/kernel/index_list.c
hw/mlx4/kernel/hca/drv.c
hw/mthca/kernel/hca_pnp.c

index 38fef0e..3f1015b 100644 (file)
@@ -1164,7 +1164,7 @@ iou_query_device_id(
        }\r
 \r
        /* Device ID is "IBA\SID_<sid> where <sid> is the IPoIB Service ID. */\r
-       p_string = ExAllocatePoolWithTag( PagedPool, IOU_DEV_ID_SIZE, 'didq' );\r
+       p_string = ExAllocatePoolWithTag( NonPagedPool, IOU_DEV_ID_SIZE, 'didq' );\r
        if( !p_string )\r
        {\r
                BUS_TRACE_EXIT( BUS_DBG_ERROR, \r
@@ -1209,7 +1209,7 @@ iou_query_hardware_ids(
                return STATUS_NO_SUCH_DEVICE;\r
        }\r
 \r
-       p_string = ExAllocatePoolWithTag( PagedPool, IOU_HW_ID_SIZE, 'dihq' );\r
+       p_string = ExAllocatePoolWithTag( NonPagedPool, IOU_HW_ID_SIZE, 'dihq' );\r
        if( !p_string )\r
        {\r
                BUS_TRACE_EXIT( BUS_DBG_ERROR, \r
@@ -1263,7 +1263,7 @@ iou_query_compatible_ids(
 \r
        UNUSED_PARAM( p_dev_obj );\r
 \r
-       p_string = ExAllocatePoolWithTag( PagedPool, sizeof(IOU_COMPAT_ID), 'dicq' );\r
+       p_string = ExAllocatePoolWithTag( NonPagedPool, sizeof(IOU_COMPAT_ID), 'dicq' );\r
        if( !p_string )\r
        {\r
                BUS_TRACE_EXIT( BUS_DBG_ERROR, \r
@@ -1299,7 +1299,7 @@ iou_query_unique_id(
        }\r
 \r
        /* The instance ID is the port GUID. */\r
-       p_string = ExAllocatePoolWithTag( PagedPool, sizeof(WCHAR) * 33, 'diuq' );\r
+       p_string = ExAllocatePoolWithTag( NonPagedPool, sizeof(WCHAR) * 33, 'diuq' );\r
        if( !p_string )\r
        {\r
                BUS_TRACE_EXIT( BUS_DBG_ERROR, \r
@@ -1345,7 +1345,7 @@ iou_query_description(
        }\r
 \r
        /* The instance ID is the port GUID. */\r
-       p_string = ExAllocatePoolWithTag( PagedPool,\r
+       p_string = ExAllocatePoolWithTag( NonPagedPool,\r
                                                                          sizeof(WCHAR) * sizeof(p_ext->desc),\r
                                                                          'sedq' );\r
        if( !p_string )\r
@@ -1391,7 +1391,7 @@ iou_query_location(
                return STATUS_NO_SUCH_DEVICE;\r
        }\r
 \r
-       p_string = ExAllocatePoolWithTag( PagedPool, IOU_LOCATION_SIZE, 'colq' );\r
+       p_string = ExAllocatePoolWithTag( NonPagedPool, IOU_LOCATION_SIZE, 'colq' );\r
        if( !p_string )\r
        {\r
                BUS_TRACE_EXIT( BUS_DBG_ERROR, \r
@@ -1430,7 +1430,7 @@ iou_query_bus_info(
 \r
        *p_action = IrpComplete;\r
 \r
-       p_bus_info = ExAllocatePoolWithTag( PagedPool, sizeof(PNP_BUS_INFORMATION), 'subq' );\r
+       p_bus_info = ExAllocatePoolWithTag( NonPagedPool, sizeof(PNP_BUS_INFORMATION), 'subq' );\r
        if( !p_bus_info )\r
        {\r
                BUS_TRACE_EXIT( BUS_DBG_ERROR,\r
index 3fc5a90..d341505 100644 (file)
@@ -1599,7 +1599,7 @@ port_query_device_id(
        dev_id_size = p_ext->pdo.p_pdo_device_info->device_id_size;\r
 \r
        /* Device ID is "IBA\SID_<sid> where <sid> is the IO device Service ID. */\r
-       p_string = ExAllocatePoolWithTag( PagedPool, dev_id_size, 'vedq' );\r
+       p_string = ExAllocatePoolWithTag( NonPagedPool, dev_id_size, 'vedq' );\r
        if( !p_string )\r
        {\r
                BUS_TRACE_EXIT( BUS_DBG_ERROR,\r
@@ -1635,7 +1635,7 @@ port_query_hardware_ids(
 \r
        dev_id_size = p_ext->pdo.p_pdo_device_info->hardware_id_size;\r
 \r
-       p_string = ExAllocatePoolWithTag( PagedPool, dev_id_size, 'ihqp' );\r
+       p_string = ExAllocatePoolWithTag( NonPagedPool, dev_id_size, 'ihqp' );\r
        if( !p_string )\r
        {\r
                BUS_TRACE_EXIT( BUS_DBG_ERROR,\r
@@ -1670,7 +1670,7 @@ port_query_compatible_ids(
 \r
        dev_id_size = p_ext->pdo.p_pdo_device_info->compatible_id_size;\r
 \r
-       p_string = ExAllocatePoolWithTag( PagedPool, dev_id_size, 'ihqp' );\r
+       p_string = ExAllocatePoolWithTag( NonPagedPool, dev_id_size, 'ihqp' );\r
        if( !p_string )\r
        {\r
                BUS_TRACE_EXIT( BUS_DBG_ERROR,\r
@@ -1710,7 +1710,7 @@ port_query_unique_id(
        }\r
 \r
        /* The instance ID is the port GUID. */\r
-       p_string = ExAllocatePoolWithTag( PagedPool, sizeof(WCHAR) * 21, 'iuqp' );\r
+       p_string = ExAllocatePoolWithTag( NonPagedPool, sizeof(WCHAR) * 21, 'iuqp' );\r
        if( !p_string )\r
        {\r
                BUS_TRACE_EXIT( BUS_DBG_ERROR,\r
@@ -1754,7 +1754,7 @@ port_query_description(
        }\r
 \r
 \r
-       p_string = ExAllocatePoolWithTag( PagedPool, p_ext->pdo.p_pdo_device_info->description_size, 'edqp' );\r
+       p_string = ExAllocatePoolWithTag( NonPagedPool, p_ext->pdo.p_pdo_device_info->description_size, 'edqp' );\r
 \r
        if( !p_string )\r
        {\r
@@ -1822,7 +1822,7 @@ port_query_location(
                return STATUS_INSUFFICIENT_RESOURCES;\r
        }\r
 \r
-       p_string = ExAllocatePoolWithTag( PagedPool, size, 'olqp' );\r
+       p_string = ExAllocatePoolWithTag( NonPagedPool, size, 'olqp' );\r
        if( !p_string )\r
        {\r
                BUS_TRACE_EXIT( BUS_DBG_ERROR,\r
@@ -1875,7 +1875,7 @@ port_query_bus_info(
 \r
        *p_action = IrpComplete;\r
 \r
-       p_bus_info = ExAllocatePoolWithTag( PagedPool, sizeof(PNP_BUS_INFORMATION), 'ibqp' );\r
+       p_bus_info = ExAllocatePoolWithTag( NonPagedPool, sizeof(PNP_BUS_INFORMATION), 'ibqp' );\r
        if( !p_bus_info )\r
        {\r
                BUS_TRACE_EXIT( BUS_DBG_ERROR,\r
index a984240..93e3e91 100644 (file)
@@ -1185,7 +1185,7 @@ cl_alloc_relations(
                alloc_size += (sizeof(PDEVICE_OBJECT) * p_old_rel->Count);\r
 \r
        /* Allocate the new relations structure. */\r
-       p_rel = ExAllocatePoolWithTag( PagedPool, alloc_size, 'ralc' );\r
+       p_rel = ExAllocatePoolWithTag( NonPagedPool, alloc_size, 'ralc' );\r
        p_irp->IoStatus.Information = (ULONG_PTR)p_rel;\r
        if( !p_rel )\r
        {\r
index c475fdc..8ad88a7 100644 (file)
@@ -952,7 +952,7 @@ ioc_query_device_id(
        {\r
 \r
                dev_id_size = (p_ext->pdo.p_pdo_device_info)->device_id_size;\r
-               p_string = ExAllocatePoolWithTag( PagedPool, dev_id_size, 'didq' );\r
+               p_string = ExAllocatePoolWithTag( NonPagedPool, dev_id_size, 'didq' );\r
 \r
                if( !p_string )\r
                {\r
@@ -968,7 +968,7 @@ ioc_query_device_id(
        } \r
        else \r
        {\r
-       p_string = ExAllocatePoolWithTag( PagedPool, IOC_DEV_ID_SIZE, 'didq' );\r
+       p_string = ExAllocatePoolWithTag( NonPagedPool, IOC_DEV_ID_SIZE, 'didq' );\r
        if( !p_string )\r
        {\r
                IOU_PRINT_EXIT( TRACE_LEVEL_ERROR, IOU_DBG_ERROR,\r
@@ -1027,7 +1027,7 @@ ioc_query_hardware_ids(
        {\r
                hw_id_size = p_ext->pdo.p_pdo_device_info->hardware_id_size;\r
 \r
-               p_string = ExAllocatePoolWithTag( PagedPool, hw_id_size, 'ihqi' );\r
+               p_string = ExAllocatePoolWithTag( NonPagedPool, hw_id_size, 'ihqi' );\r
                if( !p_string )\r
                {\r
                        IOU_PRINT_EXIT( TRACE_LEVEL_ERROR, IOU_DBG_ERROR,\r
@@ -1042,7 +1042,7 @@ ioc_query_hardware_ids(
        } \r
        else \r
        {\r
-       p_string = ExAllocatePoolWithTag( PagedPool, IOC_HW_ID_SIZE, 'ihqi' );\r
+       p_string = ExAllocatePoolWithTag( NonPagedPool, IOC_HW_ID_SIZE, 'ihqi' );\r
        if( !p_string )\r
        {\r
                IOU_PRINT_EXIT( TRACE_LEVEL_ERROR, IOU_DBG_ERROR,\r
@@ -1143,7 +1143,7 @@ ioc_query_compatible_ids(
 \r
                compat_id_size = p_ext->pdo.p_pdo_device_info->compatible_id_size;\r
 \r
-               p_string = ExAllocatePoolWithTag( PagedPool, compat_id_size, 'icqi' );\r
+               p_string = ExAllocatePoolWithTag( NonPagedPool, compat_id_size, 'icqi' );\r
 \r
                if( !p_string )\r
                {\r
@@ -1159,7 +1159,7 @@ ioc_query_compatible_ids(
        } \r
        else \r
        {\r
-       p_string = ExAllocatePoolWithTag( PagedPool, IOC_COMPAT_ID_SIZE, 'icqi' );\r
+       p_string = ExAllocatePoolWithTag( NonPagedPool, IOC_COMPAT_ID_SIZE, 'icqi' );\r
        if( !p_string )\r
        {\r
                IOU_PRINT_EXIT( TRACE_LEVEL_ERROR, IOU_DBG_ERROR,\r
@@ -1229,7 +1229,7 @@ ioc_query_unique_id(
        if ( p_ext->pdo.p_pdo_device_info ) \r
        {\r
 \r
-               p_string = ExAllocatePoolWithTag( PagedPool, sizeof(WCHAR) * 41, 'iuqi' );\r
+               p_string = ExAllocatePoolWithTag( NonPagedPool, sizeof(WCHAR) * 41, 'iuqi' );\r
                if( !p_string )\r
                {\r
                        IOU_PRINT_EXIT( TRACE_LEVEL_ERROR, IOU_DBG_ERROR,\r
@@ -1252,7 +1252,7 @@ ioc_query_unique_id(
        } \r
        else \r
        {\r
-       p_string = ExAllocatePoolWithTag( PagedPool, sizeof(WCHAR) * 33, 'iuqi' );\r
+       p_string = ExAllocatePoolWithTag( NonPagedPool, sizeof(WCHAR) * 33, 'iuqi' );\r
        if( !p_string )\r
        {\r
                IOU_PRINT_EXIT( TRACE_LEVEL_ERROR, IOU_DBG_ERROR,\r
@@ -1302,7 +1302,7 @@ ioc_query_description(
 \r
        if ( p_ext->pdo.p_pdo_device_info ) \r
        {\r
-               p_string = ExAllocatePoolWithTag( PagedPool, p_ext->pdo.p_pdo_device_info->description_size, \r
+               p_string = ExAllocatePoolWithTag( NonPagedPool, p_ext->pdo.p_pdo_device_info->description_size, \r
                                                'edqi' );\r
                if( !p_string )\r
                {\r
@@ -1320,7 +1320,7 @@ ioc_query_description(
        } \r
        else \r
        {\r
-       p_string = ExAllocatePoolWithTag( PagedPool,\r
+       p_string = ExAllocatePoolWithTag( NonPagedPool,\r
                                                                          sizeof(WCHAR) * sizeof(p_ext->info.profile.id_string),\r
                                                                          'edqi');\r
        if( !p_string )\r
@@ -1387,7 +1387,7 @@ ioc_query_location(
                return STATUS_NO_SUCH_DEVICE;\r
        }\r
 \r
-       p_string = ExAllocatePoolWithTag( PagedPool, \r
+       p_string = ExAllocatePoolWithTag( NonPagedPool, \r
                                                                          max( IOC_LOCATION_SIZE, sizeof( WCHAR ) *\r
                                                                               ( sizeof( p_ext->info.profile.id_string ) + 1 )),\r
                                                                          'olqi');\r
@@ -1447,7 +1447,7 @@ ioc_query_bus_info(
 \r
        *p_action = IrpComplete;\r
 \r
-       p_iou_info = ExAllocatePoolWithTag( PagedPool, sizeof(PNP_BUS_INFORMATION), 'ibqi' );\r
+       p_iou_info = ExAllocatePoolWithTag( NonPagedPool, sizeof(PNP_BUS_INFORMATION), 'ibqi' );\r
        if( !p_iou_info )\r
        {\r
                IOU_PRINT_EXIT( TRACE_LEVEL_ERROR, IOU_DBG_ERROR,\r
index 552c67b..4b3e649 100644 (file)
@@ -37,7 +37,7 @@ static BOOLEAN IndexListGrow(INDEX_LIST *pIndexList)
        SIZE_T          size, i;\r
 \r
        size = pIndexList->Size + (PAGE_SIZE / sizeof(INDEX_ENTRY));\r
-       array = ExAllocatePoolWithTag(PagedPool, size * sizeof(INDEX_ENTRY), 'xdni');\r
+       array = ExAllocatePoolWithTag(NonPagedPool, size * sizeof(INDEX_ENTRY), 'xdni');\r
        if (array == NULL) {\r
                return FALSE;\r
        }\r
index ff4e526..9302dd2 100644 (file)
@@ -85,7 +85,7 @@ __alloc_hca_ifc(
        HCA_ENTER( HCA_DBG_PNP );\r
 \r
        pIfc =\r
-               (ci_interface_t*)ExAllocatePoolWithTag( PagedPool, sizeof(ci_interface_t), MT_TAG_KERNEL );\r
+               (ci_interface_t*)ExAllocatePoolWithTag( NonPagedPool, sizeof(ci_interface_t), MT_TAG_KERNEL );\r
        if( !pIfc )\r
        {\r
                HCA_PRINT( TRACE_LEVEL_ERROR,HCA_DBG_PNP, \r
@@ -877,7 +877,7 @@ __alloc_hca_ifc(
 \r
        HCA_ENTER( HCA_DBG_PNP );\r
 \r
-       pIfc = (ci_interface_t*)ExAllocatePoolWithTag( PagedPool,\r
+       pIfc = (ci_interface_t*)ExAllocatePoolWithTag( NonPagedPool,\r
                sizeof(ci_interface_t), MT_TAG_KERNEL );\r
        if( !pIfc )\r
        {\r
index d34039d..147ac6b 100644 (file)
@@ -227,7 +227,7 @@ __alloc_hca_ifc(
 \r
        HCA_ENTER( HCA_DBG_PNP );\r
 \r
-       pIfc = (ci_interface_t*)ExAllocatePoolWithTag( PagedPool,\r
+       pIfc = (ci_interface_t*)ExAllocatePoolWithTag( NonPagedPool,\r
                                                                                                   sizeof(ci_interface_t),\r
                                                                                                   'pnpa' );\r
        if( !pIfc )\r