From 7eaeec48974a060741b024cf2ff29a582fd1a72a Mon Sep 17 00:00:00 2001 From: leonidk Date: Mon, 26 Oct 2009 10:05:59 +0000 Subject: [PATCH] [CORE,HW] replace using of Paged pool by NonPaged one. [mlnx: 4836] 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 | 14 +++++++------- trunk/core/bus/kernel/bus_port_mgr.c | 14 +++++++------- trunk/core/complib/kernel/cl_pnp_po.c | 2 +- trunk/core/iou/kernel/iou_ioc_mgr.c | 24 ++++++++++++------------ trunk/etc/kernel/index_list.c | 2 +- trunk/hw/mlx4/kernel/hca/drv.c | 4 ++-- trunk/hw/mthca/kernel/hca_pnp.c | 2 +- 7 files changed, 31 insertions(+), 31 deletions(-) diff --git a/trunk/core/bus/kernel/bus_iou_mgr.c b/trunk/core/bus/kernel/bus_iou_mgr.c index 38fef0e6..3f1015b0 100644 --- a/trunk/core/bus/kernel/bus_iou_mgr.c +++ b/trunk/core/bus/kernel/bus_iou_mgr.c @@ -1164,7 +1164,7 @@ iou_query_device_id( } /* Device ID is "IBA\SID_ where is the IPoIB Service ID. */ - p_string = ExAllocatePoolWithTag( PagedPool, IOU_DEV_ID_SIZE, 'didq' ); + p_string = ExAllocatePoolWithTag( NonPagedPool, IOU_DEV_ID_SIZE, 'didq' ); if( !p_string ) { BUS_TRACE_EXIT( BUS_DBG_ERROR, @@ -1209,7 +1209,7 @@ iou_query_hardware_ids( return STATUS_NO_SUCH_DEVICE; } - p_string = ExAllocatePoolWithTag( PagedPool, IOU_HW_ID_SIZE, 'dihq' ); + p_string = ExAllocatePoolWithTag( NonPagedPool, IOU_HW_ID_SIZE, 'dihq' ); if( !p_string ) { BUS_TRACE_EXIT( BUS_DBG_ERROR, @@ -1263,7 +1263,7 @@ iou_query_compatible_ids( UNUSED_PARAM( p_dev_obj ); - p_string = ExAllocatePoolWithTag( PagedPool, sizeof(IOU_COMPAT_ID), 'dicq' ); + p_string = ExAllocatePoolWithTag( NonPagedPool, sizeof(IOU_COMPAT_ID), 'dicq' ); if( !p_string ) { BUS_TRACE_EXIT( BUS_DBG_ERROR, @@ -1299,7 +1299,7 @@ iou_query_unique_id( } /* The instance ID is the port GUID. */ - p_string = ExAllocatePoolWithTag( PagedPool, sizeof(WCHAR) * 33, 'diuq' ); + p_string = ExAllocatePoolWithTag( NonPagedPool, sizeof(WCHAR) * 33, 'diuq' ); if( !p_string ) { BUS_TRACE_EXIT( BUS_DBG_ERROR, @@ -1345,7 +1345,7 @@ iou_query_description( } /* The instance ID is the port GUID. */ - p_string = ExAllocatePoolWithTag( PagedPool, + p_string = ExAllocatePoolWithTag( NonPagedPool, sizeof(WCHAR) * sizeof(p_ext->desc), 'sedq' ); if( !p_string ) @@ -1391,7 +1391,7 @@ iou_query_location( return STATUS_NO_SUCH_DEVICE; } - p_string = ExAllocatePoolWithTag( PagedPool, IOU_LOCATION_SIZE, 'colq' ); + p_string = ExAllocatePoolWithTag( NonPagedPool, IOU_LOCATION_SIZE, 'colq' ); if( !p_string ) { BUS_TRACE_EXIT( BUS_DBG_ERROR, @@ -1430,7 +1430,7 @@ iou_query_bus_info( *p_action = IrpComplete; - p_bus_info = ExAllocatePoolWithTag( PagedPool, sizeof(PNP_BUS_INFORMATION), 'subq' ); + p_bus_info = ExAllocatePoolWithTag( NonPagedPool, sizeof(PNP_BUS_INFORMATION), 'subq' ); if( !p_bus_info ) { BUS_TRACE_EXIT( BUS_DBG_ERROR, diff --git a/trunk/core/bus/kernel/bus_port_mgr.c b/trunk/core/bus/kernel/bus_port_mgr.c index 3fc5a903..d3415054 100644 --- a/trunk/core/bus/kernel/bus_port_mgr.c +++ b/trunk/core/bus/kernel/bus_port_mgr.c @@ -1599,7 +1599,7 @@ port_query_device_id( dev_id_size = p_ext->pdo.p_pdo_device_info->device_id_size; /* Device ID is "IBA\SID_ where is the IO device Service ID. */ - p_string = ExAllocatePoolWithTag( PagedPool, dev_id_size, 'vedq' ); + p_string = ExAllocatePoolWithTag( NonPagedPool, dev_id_size, 'vedq' ); if( !p_string ) { BUS_TRACE_EXIT( BUS_DBG_ERROR, @@ -1635,7 +1635,7 @@ port_query_hardware_ids( dev_id_size = p_ext->pdo.p_pdo_device_info->hardware_id_size; - p_string = ExAllocatePoolWithTag( PagedPool, dev_id_size, 'ihqp' ); + p_string = ExAllocatePoolWithTag( NonPagedPool, dev_id_size, 'ihqp' ); if( !p_string ) { BUS_TRACE_EXIT( BUS_DBG_ERROR, @@ -1670,7 +1670,7 @@ port_query_compatible_ids( dev_id_size = p_ext->pdo.p_pdo_device_info->compatible_id_size; - p_string = ExAllocatePoolWithTag( PagedPool, dev_id_size, 'ihqp' ); + p_string = ExAllocatePoolWithTag( NonPagedPool, dev_id_size, 'ihqp' ); if( !p_string ) { BUS_TRACE_EXIT( BUS_DBG_ERROR, @@ -1710,7 +1710,7 @@ port_query_unique_id( } /* The instance ID is the port GUID. */ - p_string = ExAllocatePoolWithTag( PagedPool, sizeof(WCHAR) * 21, 'iuqp' ); + p_string = ExAllocatePoolWithTag( NonPagedPool, sizeof(WCHAR) * 21, 'iuqp' ); if( !p_string ) { BUS_TRACE_EXIT( BUS_DBG_ERROR, @@ -1754,7 +1754,7 @@ port_query_description( } - p_string = ExAllocatePoolWithTag( PagedPool, p_ext->pdo.p_pdo_device_info->description_size, 'edqp' ); + p_string = ExAllocatePoolWithTag( NonPagedPool, p_ext->pdo.p_pdo_device_info->description_size, 'edqp' ); if( !p_string ) { @@ -1822,7 +1822,7 @@ port_query_location( return STATUS_INSUFFICIENT_RESOURCES; } - p_string = ExAllocatePoolWithTag( PagedPool, size, 'olqp' ); + p_string = ExAllocatePoolWithTag( NonPagedPool, size, 'olqp' ); if( !p_string ) { BUS_TRACE_EXIT( BUS_DBG_ERROR, @@ -1875,7 +1875,7 @@ port_query_bus_info( *p_action = IrpComplete; - p_bus_info = ExAllocatePoolWithTag( PagedPool, sizeof(PNP_BUS_INFORMATION), 'ibqp' ); + p_bus_info = ExAllocatePoolWithTag( NonPagedPool, sizeof(PNP_BUS_INFORMATION), 'ibqp' ); if( !p_bus_info ) { BUS_TRACE_EXIT( BUS_DBG_ERROR, diff --git a/trunk/core/complib/kernel/cl_pnp_po.c b/trunk/core/complib/kernel/cl_pnp_po.c index a984240d..93e3e91f 100644 --- a/trunk/core/complib/kernel/cl_pnp_po.c +++ b/trunk/core/complib/kernel/cl_pnp_po.c @@ -1185,7 +1185,7 @@ cl_alloc_relations( alloc_size += (sizeof(PDEVICE_OBJECT) * p_old_rel->Count); /* Allocate the new relations structure. */ - p_rel = ExAllocatePoolWithTag( PagedPool, alloc_size, 'ralc' ); + p_rel = ExAllocatePoolWithTag( NonPagedPool, alloc_size, 'ralc' ); p_irp->IoStatus.Information = (ULONG_PTR)p_rel; if( !p_rel ) { diff --git a/trunk/core/iou/kernel/iou_ioc_mgr.c b/trunk/core/iou/kernel/iou_ioc_mgr.c index c475fdc2..8ad88a7e 100644 --- a/trunk/core/iou/kernel/iou_ioc_mgr.c +++ b/trunk/core/iou/kernel/iou_ioc_mgr.c @@ -952,7 +952,7 @@ ioc_query_device_id( { dev_id_size = (p_ext->pdo.p_pdo_device_info)->device_id_size; - p_string = ExAllocatePoolWithTag( PagedPool, dev_id_size, 'didq' ); + p_string = ExAllocatePoolWithTag( NonPagedPool, dev_id_size, 'didq' ); if( !p_string ) { @@ -968,7 +968,7 @@ ioc_query_device_id( } else { - p_string = ExAllocatePoolWithTag( PagedPool, IOC_DEV_ID_SIZE, 'didq' ); + p_string = ExAllocatePoolWithTag( NonPagedPool, IOC_DEV_ID_SIZE, 'didq' ); if( !p_string ) { IOU_PRINT_EXIT( TRACE_LEVEL_ERROR, IOU_DBG_ERROR, @@ -1027,7 +1027,7 @@ ioc_query_hardware_ids( { hw_id_size = p_ext->pdo.p_pdo_device_info->hardware_id_size; - p_string = ExAllocatePoolWithTag( PagedPool, hw_id_size, 'ihqi' ); + p_string = ExAllocatePoolWithTag( NonPagedPool, hw_id_size, 'ihqi' ); if( !p_string ) { IOU_PRINT_EXIT( TRACE_LEVEL_ERROR, IOU_DBG_ERROR, @@ -1042,7 +1042,7 @@ ioc_query_hardware_ids( } else { - p_string = ExAllocatePoolWithTag( PagedPool, IOC_HW_ID_SIZE, 'ihqi' ); + p_string = ExAllocatePoolWithTag( NonPagedPool, IOC_HW_ID_SIZE, 'ihqi' ); if( !p_string ) { IOU_PRINT_EXIT( TRACE_LEVEL_ERROR, IOU_DBG_ERROR, @@ -1143,7 +1143,7 @@ ioc_query_compatible_ids( compat_id_size = p_ext->pdo.p_pdo_device_info->compatible_id_size; - p_string = ExAllocatePoolWithTag( PagedPool, compat_id_size, 'icqi' ); + p_string = ExAllocatePoolWithTag( NonPagedPool, compat_id_size, 'icqi' ); if( !p_string ) { @@ -1159,7 +1159,7 @@ ioc_query_compatible_ids( } else { - p_string = ExAllocatePoolWithTag( PagedPool, IOC_COMPAT_ID_SIZE, 'icqi' ); + p_string = ExAllocatePoolWithTag( NonPagedPool, IOC_COMPAT_ID_SIZE, 'icqi' ); if( !p_string ) { IOU_PRINT_EXIT( TRACE_LEVEL_ERROR, IOU_DBG_ERROR, @@ -1229,7 +1229,7 @@ ioc_query_unique_id( if ( p_ext->pdo.p_pdo_device_info ) { - p_string = ExAllocatePoolWithTag( PagedPool, sizeof(WCHAR) * 41, 'iuqi' ); + p_string = ExAllocatePoolWithTag( NonPagedPool, sizeof(WCHAR) * 41, 'iuqi' ); if( !p_string ) { IOU_PRINT_EXIT( TRACE_LEVEL_ERROR, IOU_DBG_ERROR, @@ -1252,7 +1252,7 @@ ioc_query_unique_id( } else { - p_string = ExAllocatePoolWithTag( PagedPool, sizeof(WCHAR) * 33, 'iuqi' ); + p_string = ExAllocatePoolWithTag( NonPagedPool, sizeof(WCHAR) * 33, 'iuqi' ); if( !p_string ) { IOU_PRINT_EXIT( TRACE_LEVEL_ERROR, IOU_DBG_ERROR, @@ -1302,7 +1302,7 @@ ioc_query_description( if ( p_ext->pdo.p_pdo_device_info ) { - p_string = ExAllocatePoolWithTag( PagedPool, p_ext->pdo.p_pdo_device_info->description_size, + p_string = ExAllocatePoolWithTag( NonPagedPool, p_ext->pdo.p_pdo_device_info->description_size, 'edqi' ); if( !p_string ) { @@ -1320,7 +1320,7 @@ ioc_query_description( } else { - p_string = ExAllocatePoolWithTag( PagedPool, + p_string = ExAllocatePoolWithTag( NonPagedPool, sizeof(WCHAR) * sizeof(p_ext->info.profile.id_string), 'edqi'); if( !p_string ) @@ -1387,7 +1387,7 @@ ioc_query_location( return STATUS_NO_SUCH_DEVICE; } - p_string = ExAllocatePoolWithTag( PagedPool, + p_string = ExAllocatePoolWithTag( NonPagedPool, max( IOC_LOCATION_SIZE, sizeof( WCHAR ) * ( sizeof( p_ext->info.profile.id_string ) + 1 )), 'olqi'); @@ -1447,7 +1447,7 @@ ioc_query_bus_info( *p_action = IrpComplete; - p_iou_info = ExAllocatePoolWithTag( PagedPool, sizeof(PNP_BUS_INFORMATION), 'ibqi' ); + p_iou_info = ExAllocatePoolWithTag( NonPagedPool, sizeof(PNP_BUS_INFORMATION), 'ibqi' ); if( !p_iou_info ) { IOU_PRINT_EXIT( TRACE_LEVEL_ERROR, IOU_DBG_ERROR, diff --git a/trunk/etc/kernel/index_list.c b/trunk/etc/kernel/index_list.c index 552c67b3..4b3e6491 100644 --- a/trunk/etc/kernel/index_list.c +++ b/trunk/etc/kernel/index_list.c @@ -37,7 +37,7 @@ static BOOLEAN IndexListGrow(INDEX_LIST *pIndexList) SIZE_T size, i; size = pIndexList->Size + (PAGE_SIZE / sizeof(INDEX_ENTRY)); - array = ExAllocatePoolWithTag(PagedPool, size * sizeof(INDEX_ENTRY), 'xdni'); + array = ExAllocatePoolWithTag(NonPagedPool, size * sizeof(INDEX_ENTRY), 'xdni'); if (array == NULL) { return FALSE; } diff --git a/trunk/hw/mlx4/kernel/hca/drv.c b/trunk/hw/mlx4/kernel/hca/drv.c index ff4e5266..9302dd29 100644 --- a/trunk/hw/mlx4/kernel/hca/drv.c +++ b/trunk/hw/mlx4/kernel/hca/drv.c @@ -85,7 +85,7 @@ __alloc_hca_ifc( HCA_ENTER( HCA_DBG_PNP ); pIfc = - (ci_interface_t*)ExAllocatePoolWithTag( PagedPool, sizeof(ci_interface_t), MT_TAG_KERNEL ); + (ci_interface_t*)ExAllocatePoolWithTag( NonPagedPool, sizeof(ci_interface_t), MT_TAG_KERNEL ); if( !pIfc ) { HCA_PRINT( TRACE_LEVEL_ERROR,HCA_DBG_PNP, @@ -877,7 +877,7 @@ __alloc_hca_ifc( HCA_ENTER( HCA_DBG_PNP ); - pIfc = (ci_interface_t*)ExAllocatePoolWithTag( PagedPool, + pIfc = (ci_interface_t*)ExAllocatePoolWithTag( NonPagedPool, sizeof(ci_interface_t), MT_TAG_KERNEL ); if( !pIfc ) { diff --git a/trunk/hw/mthca/kernel/hca_pnp.c b/trunk/hw/mthca/kernel/hca_pnp.c index d34039df..147ac6ba 100644 --- a/trunk/hw/mthca/kernel/hca_pnp.c +++ b/trunk/hw/mthca/kernel/hca_pnp.c @@ -227,7 +227,7 @@ __alloc_hca_ifc( HCA_ENTER( HCA_DBG_PNP ); - pIfc = (ci_interface_t*)ExAllocatePoolWithTag( PagedPool, + pIfc = (ci_interface_t*)ExAllocatePoolWithTag( NonPagedPool, sizeof(ci_interface_t), 'pnpa' ); if( !pIfc ) -- 2.41.0