Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp38253348rwd; Wed, 12 Jul 2023 05:24:10 -0700 (PDT) X-Google-Smtp-Source: APBJJlHhCHVGSAuropNxz9MgigD+QtHHBlQr7ilHK0krUl0f13LLFlNo34OjI/6HBxkrTJ2X1VKe X-Received: by 2002:a05:6358:880f:b0:134:ece4:1e81 with SMTP id hv15-20020a056358880f00b00134ece41e81mr6260138rwb.7.1689164650046; Wed, 12 Jul 2023 05:24:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689164650; cv=none; d=google.com; s=arc-20160816; b=ZuE0aLgwT2wM6kU6PL3UB3wN/tXxaWG+3Z+pEwDjlmT0AUR9DT0b/XVzhxhgeBUlYJ eiOUufHWrK/i3ca6mWD38Dxa5emILCQnsGX9f6wr0gBu2muh2VDMmjAOEdetYj1bzEfW +b7M8WTV1bBTK8Jnu9h9ySLazJy1uIR14TYH9nIM1N7f/0LkVg4f18yL2QnpwpJfFcAB u3nxFVaS9FFfZX6i0PKAixtlgcuRD3bznxWA2CJc0F7oXai5Kp3wmbf0zliQriJaMF2q ldfbAirl9d9I3hGstX6t9t4Jwt8KWKr2TPcX0nL58uJIncebVJ74QE3l3cmCkkF8RgiZ VJ7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version:date :message-id:subject:references:in-reply-to:cc:to:from:dkim-signature; bh=i8mkWD93KekHuhe6Jbz1MSMDnt+mNn5Q1uAdbtpJcms=; fh=BG9t5hExT64ZzVkSX8llkAxSPOs39f+Z4+VN61zvjx0=; b=bH3/S/ZA2t/WdRD3QGeLNqaJvumkzzNXDEcTpeiQ4+7pwW/RwJVyBHbbwX5PILqpGZ THFiPCck5mJXrXjACaJ94vCcJPOYT2fudLOOv5SeA/vm1JKW9Agc4Fd/y4UH9ftU7PvB YWWo5kvFPmSy+IU0FG/I2mtkC1tl9BMhMT/ct/bLiN7gKitNVWXfztKfOLwcjbeIWfdc D5uhelXMNk2OWMUn6k94m58IrQWPSgT/IMc0jbp2qDOncG1xsQQEbznk8JII5NmXPkhS gA0OmsPBTQuISBoEaxOwKmrahCpxrZxu1foJYqWB8I0FcmDvs+MoDZKopEM6hLkw2Jwg iKWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hUQaOiE9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f20-20020a63e314000000b00543a6cc74bfsi3116997pgh.634.2023.07.12.05.23.57; Wed, 12 Jul 2023 05:24:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=hUQaOiE9; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231183AbjGLMKd (ORCPT + 99 others); Wed, 12 Jul 2023 08:10:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59790 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231792AbjGLMKa (ORCPT ); Wed, 12 Jul 2023 08:10:30 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3FA60E4D; Wed, 12 Jul 2023 05:10:29 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C8F906179C; Wed, 12 Jul 2023 12:10:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A9683C433C8; Wed, 12 Jul 2023 12:10:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1689163828; bh=Vo61rsO+lUWHdqkKANoX9t5JCQQtSJ185lJYvF87Rdw=; h=From:To:Cc:In-Reply-To:References:Subject:Date:From; b=hUQaOiE9iCaW78i0WRqsSeZxV5J1kzmGQ0QKwxMOMJbd7/0Ug9JdNneEEAmjStKHL 02vyPgxSX7ToxJgT3Vc52dbXy70ShreJ5kz1d7zBjrTqsaljq4/uwKUnMsx001+7Hf G2jIbDuPVBjCpKBYU7ZFlSVZS3OfVy8yA4ZqVVHMX4Uj+cmWVdj+/CcbWJ9hRKJ2Bh +OoNT9tlkRsMlYmtNFagCtWMZmE+93OrVvYktYWzmwLSqEz5A3lJjWX3Oyu21iFRzP weuJ21b80ynkaQyciGrzgwwWcVeNcgSshlyj6UZIceUuNHG0atHlT6P4oBUCVLri8M k++llNdDBI0yA== From: Leon Romanovsky To: jgg@ziepe.ca, Yuanyuan Zhong Cc: cachen@purestorage.com, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230629213248.3184245-1-yzhong@purestorage.com> References: <20230629213248.3184245-1-yzhong@purestorage.com> Subject: Re: [PATCH 0/1] RDMA/mlx5: align MR mem allocation size to power-of-two Message-Id: <168916382400.1207710.3116190060320574787.b4-ty@kernel.org> Date: Wed, 12 Jul 2023 15:10:24 +0300 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Mailer: b4 0.12-dev-a055d X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 29 Jun 2023 15:32:47 -0600, Yuanyuan Zhong wrote: > Recently I noticed the mlx5_alloc_priv_descs() do many allocations from > kmalloc-8k. It's called from following chain: > cma_cm_event_handler => nvme_rdma_cm_handler => nvme_rdma_create_queue_ib > => ib_mr_pool_init => ib_alloc_mr => __mlx5_ib_alloc_mr > => _mlx5_alloc_mkey_descs > > When the nvme-rdma asks to allocate memory regions that support maximum 257 > sg entries, the real MR memory allocation size is slightly bigger than 2048. > > [...] Applied, thanks! [1/1] RDMA/mlx5: align MR mem allocation size to power-of-two https://git.kernel.org/rdma/rdma/c/52b4bdd28c861e Best regards, -- Leon Romanovsky