From patchwork Sat Apr 3 04:53:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Praveen Kumar Kannoju X-Patchwork-Id: 12181805 X-Patchwork-Delegate: jgg@ziepe.ca Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 66718C433ED for ; Sat, 3 Apr 2021 04:54:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2E04E6044F for ; Sat, 3 Apr 2021 04:54:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232178AbhDCEyH (ORCPT ); Sat, 3 Apr 2021 00:54:07 -0400 Received: from aserp2120.oracle.com ([141.146.126.78]:48860 "EHLO aserp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229740AbhDCEyF (ORCPT ); Sat, 3 Apr 2021 00:54:05 -0400 Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 1334qgU2057828; Sat, 3 Apr 2021 04:54:00 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : content-type : mime-version; s=corp-2020-01-29; bh=s9k6TQZ+88BTvPkUL8syVOoVm+0P0bmKfiaxFKklAfg=; b=gF3U6iet/xnWpXmhjrds7Ot7EcsdwmAgemi2dd9ltYQsoxj7rn2+0uoX8QzhPAXnsDf/ EQufqg1k8S/QchxrJyzNyokQ5hYYLbw254XIz++na1d48a9NofbbA+p4ReYxo6cj5dX2 wDbv1cQiyiCpjFS7R0sDT55Hoty17zBlIicjj+HSPrdO7v6IOZ2Xs14PxP026eLh9xNJ owSqB/lOR6G6lND/cFPh6gKWOcrjo+jbYLp0H4AwPTy/jodShwzW2/iazNXhqUPdrqzy bppFCn+OSyuTgesTD2/dJNeVu3N1f2PkzpmCPOEYraV3FQTovNlGEZEUq92WeSd/1C/R FA== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by aserp2120.oracle.com with ESMTP id 37pgam81nn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 03 Apr 2021 04:54:00 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 1334p1hI146372; Sat, 3 Apr 2021 04:53:59 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2108.outbound.protection.outlook.com [104.47.70.108]) by aserp3020.oracle.com with ESMTP id 37pg611y6f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 03 Apr 2021 04:53:59 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RF2yskH8elrzNUVBGXuLYCt6ExHC1ORLPQSZQtckADI+0Y8bHeBNsY9kiNwH0GmsrOlUoC7kKSdB4KEj+EHrvOLMn3tjMbLnIr6BsEoyMpBpFeplXtPwsxzTSPdOVRRLy85fR8OuSVWDfXMnGU/Hn6Ly7LlaqONn0HOxtWGWpliAQUDrNJtv/9hxZXpu0hEsLputZTViWiDviPx4465dAZhN0L5Z/9oLA2EfW18vIUoov2NhlKYU4ZQft1IDu4OVz/yP0G8mL2OLuvXxi4E/O9QSbTghahSj8Z2dCFGR7i2sObuPZZqHoRwx2m1o/4PhK9wEBvl2aSi9sw9JJ9GCsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=s9k6TQZ+88BTvPkUL8syVOoVm+0P0bmKfiaxFKklAfg=; b=lyvihyOyLsI9Q5TjhJhAHc5NXise33LiJH7CGt59kI7q0cS8KdycrKTCyfp6Xj182jxkCDanMC35TKrqMhxES/wAm1YS2eZDAdPPkV40K4ySgZDDMD3If4KTQrWoPpP0LC3BGbKqgyGdIUcFxCKd5oZtpWXW+eEDVg/uuDdeKfM6/l+hJbKDGlOLUlWWCczXhH/7lzWhp9UzBW3c+VdjlhS7QPUn+A5pLqYIlEBnyiir++CAhY4LiOYQEKs0WiwRh54dHEk4UQbfmWqyqBD4iEG9DA7l5pMcN/3ALIIut8WIQFVCKYHuAT+NasMJ/iy01P2fsGhbjK+TQ79cNQGKnQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=s9k6TQZ+88BTvPkUL8syVOoVm+0P0bmKfiaxFKklAfg=; b=jVXVgAGEtqP2Iw1iS4n/Sw9+Z4rEHI7AlagWTdOMaGWA5Of+A9cZHLSlBWvwrbu/A3EbQT747Oc+E1SY7r7Ncoxh6m9mH+OTtUXxpb4SE794MzevaxTbIStqffkvZVMa0dNM+kdmUlryhh05a8vJi2Hoz3Ul1JEPof6LciaLFSU= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=oracle.com; Received: from CY4PR10MB1448.namprd10.prod.outlook.com (2603:10b6:903:27::12) by CY4PR10MB1894.namprd10.prod.outlook.com (2603:10b6:903:11a::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3999.29; Sat, 3 Apr 2021 04:53:58 +0000 Received: from CY4PR10MB1448.namprd10.prod.outlook.com ([fe80::69eb:33a1:2d07:8554]) by CY4PR10MB1448.namprd10.prod.outlook.com ([fe80::69eb:33a1:2d07:8554%5]) with mapi id 15.20.3977.033; Sat, 3 Apr 2021 04:53:58 +0000 From: Praveen Kumar Kannoju To: leon@kernel.org, dledford@redhat.com, jgg@ziepe.ca, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Cc: rajesh.sivaramasubramaniom@oracle.com, rama.nichanamatlu@oracle.com, aruna.ramakrishna@oracle.com, jeffery.yoder@oracle.com, Praveen Kumar Kannoju Subject: [PATCH v3] IB/mlx5: Reduce max order of memory allocated for xlt update Date: Sat, 3 Apr 2021 04:53:55 +0000 Message-Id: <1617425635-35631-1-git-send-email-praveen.kannoju@oracle.com> X-Mailer: git-send-email 1.8.3.1 X-Originating-IP: [138.3.200.42] X-ClientProxiedBy: SJ0PR05CA0195.namprd05.prod.outlook.com (2603:10b6:a03:330::20) To CY4PR10MB1448.namprd10.prod.outlook.com (2603:10b6:903:27::12) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pkannoju-vm.us.oracle.com (138.3.200.42) by SJ0PR05CA0195.namprd05.prod.outlook.com (2603:10b6:a03:330::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4020.8 via Frontend Transport; Sat, 3 Apr 2021 04:53:57 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 48f6b070-812b-4b19-3be2-08d8f65c7d96 X-MS-TrafficTypeDiagnostic: CY4PR10MB1894: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1443; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tq63A2Bz3JE+eb60ZTv+IiskjDU7K4wRAFLFH0u6mGlqttjhPIapiIKN+4cJKEJmzTK+o1tuyAqK0IcNxNbafsiHeKT4Dh79NA0PGYEX0eDEqxcLxB/HlnyFKJqyTg6rA6UUjb6OARojsAYD1aEUqlBMfLc39hUIjqOH38qZqkl8Uz1yfXpHZUilNkQeYu7tJamQP1oNxQwuc+6z7HLQdClCv6c/KmZ9JrE9FnpWksTFcfO/m+nH0NdJAY4sis1eswxPRaKHY7qjcKQtpNTXAPmhb115t20iRPQi2g8qHJYXgnLQkJvs/tvOGxjJNn5xR0LO+Lh2eE0URUN1cFLUbi9KyGfRJTLPh3+nAkBrYBzBogDqqOc99YuqHNa9DbOM/uqytYrWYf+/LL+jToYwXr6dD1g+zOv/Lsj+GsL6WsXDUpzkanqT2ZIzlYWa4reay5eXm4gWk9H94xfw/bvJBrBb1UrKAQhlbrHYWFpPFBk8kJKufmvj9yfIgPtghl8wbh9LFStpq1MmNZCUya4BApEUf/kK50f6rpLnID5rOtzDFx+wNyFgDjFBKxAw/teK1DFZJq25C0zQg6lO3PHuV3qCKg38zldd5W987PgTj9+ztd4xY6vdOt+LHQm2VIsHM0t5hn+xyaegQXgeLmS+3xLoF/+dbv+8Yi3k2Hc8KW8= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CY4PR10MB1448.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(136003)(376002)(366004)(346002)(39860400002)(396003)(186003)(8676002)(8936002)(86362001)(956004)(107886003)(7696005)(66946007)(16526019)(83380400001)(6486002)(52116002)(15650500001)(36756003)(2906002)(26005)(478600001)(4326008)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iGu+CIiCDTkHn4aCiuXGaBXDgLt8K6zB7iVBfa3nxptfiWO4hJRhWy1PVtqEXMP7WA1fXCNn6f5iVqLhGULRlF4zOQYkyBg/Wel78ukFr9+x2bkoTo3vkSqmr5zmqFWTVXjqEnkM6vVN5ysR9v4ZDshHMmyOiL3+mB59cXRjIgFbDNbhu3214oJvrVxjKlTC8ZaljCpNrjvrLvVoGgXcxGfOU5rDMHmJx8wRb4zDcJJz/iR/WDPCLfgaHgKMZsmhvIPXyumf/OO6jTR8nAfsFEkvrfPfgDYvNC6aSc+au+YEwIp7HXqlmAaAZ+4B7NlvbUI53uo6wQYQ6EzJTJT8UaCuK X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 48f6b070-812b-4b19-3be2-08d8f65c7d96 X-MS-Exchange-CrossTenant-AuthSource: CY4PR10MB1448.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Apr 2021 04:53:57.8886 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 2FeQaFKR4G7pYazFmvbSP+6zNs0ky5tP6RYHhxkkSt1+LNza0R+RPduqha1TdbZVJJWD3W1yjk4v9DkzYYah8PrdFFp9B9Am55/vYdNLtGg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR10MB1894 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9942 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 spamscore=0 mlxlogscore=999 phishscore=0 bulkscore=0 malwarescore=0 adultscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2103310000 definitions=main-2104030032 X-Proofpoint-ORIG-GUID: MhecNsImB-kntY2_8C-euwgFhXgZuDVi X-Proofpoint-GUID: MhecNsImB-kntY2_8C-euwgFhXgZuDVi X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=9942 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 impostorscore=0 spamscore=0 bulkscore=0 clxscore=1015 phishscore=0 mlxscore=0 mlxlogscore=999 priorityscore=1501 malwarescore=0 lowpriorityscore=0 suspectscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2103310000 definitions=main-2104030032 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org To update xlt (during mlx5_ib_reg_user_mr()), the driver can request up to 1 MB (order-8) memory, depending on the size of the MR. This costly allocation can sometimes take very long to return (a few seconds). This causes the calling application to hang for a long time, especially when the system is fragmented. To avoid these long latency spikes, the calls the higher order allocations need to fail faster in case they are not available. In order to acheive this we need __GFP_NORETRY flag in the gfp_mask before during fetching the free pages. This patch adds this flag to the mask. Signed-off-by: Praveen Kumar Kannoju Acked-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/mr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/mlx5/mr.c b/drivers/infiniband/hw/mlx5/mr.c index db05b0e..429e7aa6 100644 --- a/drivers/infiniband/hw/mlx5/mr.c +++ b/drivers/infiniband/hw/mlx5/mr.c @@ -1028,7 +1028,7 @@ static void *mlx5_ib_alloc_xlt(size_t *nents, size_t ent_size, gfp_t gfp_mask) */ might_sleep(); - gfp_mask |= __GFP_ZERO; + gfp_mask |= __GFP_ZERO | __GFP_NORETRY; /* * If the system already has a suitable high order page then just use