Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp214755iob; Mon, 2 May 2022 17:26:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz17E05Y+FfDwj2cZU31qi8lviSNwKOk8kcBnmFSDyW4YyLzFmkZXLv6quCXKyOWimO9wmi X-Received: by 2002:a17:90b:4a42:b0:1dc:6bfa:bc40 with SMTP id lb2-20020a17090b4a4200b001dc6bfabc40mr1846586pjb.215.1651537608827; Mon, 02 May 2022 17:26:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651537608; cv=none; d=google.com; s=arc-20160816; b=FBRiCQbJq1Kjvs18VH1gKCBt1BKtIwk4v39FZmYfun5BDlWUXIDI9UU80FNv1/OQQh bLSEQskAx9ad4LbYSctm52gc+DjiGDY71EF22Mi96FQozql2aaxTTCyWEItNrqbcIDYY XBV4nRGbHP87VnloDMn6aeha92Uum18UvBPqOIKrK77r6lLFY8ryF1YGAmmrDU0cE+4i vDNCAUHrXv91VYD/vjTv/9w2NGTsHnGhElO+PVQcqxbjO6Wv48/9HpN3LRPdO77sfXja 7v7VJDY+gBXGa6lE3dOcvLecTI7+d0XU+G6anxQBwQZsE6XkeZCuOjSIEcTgEFk9W42L hC7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=/aZXwjc7L8+aKhbaNItjRkj9yC9J2s0DtIlZyKl59TY=; b=CehWBDmZxTrtmZxM9fUdEVY2IZ9S20WSgavN8kQD+JL7TANjcNwgZI9KMfONKvWMUQ A1wgxA5Vub74Go7VeiOD/tnS69c1Wag0q11pPHWICd0qo2JpWl7hQEqj7O8iwoxwHvfu rvdl0Dn8FapowIad4FlzrSP7Z/tN6J5zL1yxRdD/5t2ypnjcVE0NwmdA5b9daNJJt227 NNJ49XRGekYmv8oLRMII1T+9Pmxo+Y53rCL7zuF2vh64IuT1S53nhq4AmYkpD3rdxIF+ TsgfXLbvYxlz3kccH4IkyDbTPAH1zkn3Mg+9BLgyntfYF1d3J0QqhDVOERxo2vW3C9Nq CL5w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id n12-20020a170903110c00b0015d1ea26844si19027882plh.314.2022.05.02.17.26.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 May 2022 17:26:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 831132E9DE; Mon, 2 May 2022 17:21:33 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244475AbiD1PKL (ORCPT + 99 others); Thu, 28 Apr 2022 11:10:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348803AbiD1PKK (ORCPT ); Thu, 28 Apr 2022 11:10:10 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54E8C2982F for ; Thu, 28 Apr 2022 08:06:51 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id C4C5368AFE; Thu, 28 Apr 2022 17:06:45 +0200 (CEST) Date: Thu, 28 Apr 2022 17:06:44 +0200 From: Christoph Hellwig To: Thomas =?iso-8859-1?Q?Wei=DFschuh?= Cc: Christoph Hellwig , Keith Busch , Jens Axboe , Sagi Grimberg , linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org Subject: Re: [PATCH] nvme-pci: fix host memory buffer allocation size Message-ID: <20220428150644.GA22685@lst.de> References: <20220428101922.14216-1-linux@weissschuh.net> <20220428143603.GA20460@lst.de> <5060d75e-46c0-4d29-a334-62c7e9714fa7@t-8ch.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <5060d75e-46c0-4d29-a334-62c7e9714fa7@t-8ch.de> User-Agent: Mutt/1.5.17 (2007-11-01) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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, Apr 28, 2022 at 04:44:47PM +0200, Thomas Wei?schuh wrote: > Is the current code supposed to reach HMPRE? It does not for me. > > The code tries to allocate memory for HMPRE in chunks. > The best allocation would be to allocate one chunk for all of HMPRE. > If this fails we half the chunk size on each iteration and try again. > > On my hardware we start with a chunk_size of 4MiB and just allocate > 8 (hmmaxd) * 4 = 32 MiB which is worse than 1 * 200MiB. And that is because the hardware only has a limited set of descriptors. Is there any real problem you are fixing with this? Do you actually see a performance difference on a relevant workload?