]> git.openfabrics.org - ~shefty/rdma-win.git/commitdiff
[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@2510 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

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

index 38fef0e66e476345d71b429c6e1bed5143468f8c..3f1015b0b3f7923d86b7759e8beaec7aa8c9ea8c 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 3fc5a903994bc7f6a425e9334ff635e7bab097f8..d34150541f8a129ca14b168b06894e732c091155 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 a984240d16f52e8ddc292fa6de0a86b8f0110f1f..93e3e91f2a67296ecbea6232f5d35b7941545d8c 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 c475fdc2005091e274c40f7342d6b5063cd655d0..8ad88a7e998d5869e1969fb4874ebcb5171114a8 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 552c67b39509d019f23dcc29cd2d7277d0805a3a..4b3e6491f2dfb769e7aafc08172cf62e543375eb 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 ff4e5266a95d2b7274bd19341d84e1516f71034f..9302dd291ca3d9cd411d8cbee7b01bba410de98e 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 d34039df0d7b0ee70e0682fe3ddbe45a5fad3ccb..147ac6ba8f18592f11084d4eab3126e8f63ea5fe 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