From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9584DC433EF for ; Tue, 17 May 2022 19:35:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352793AbiEQTf2 (ORCPT ); Tue, 17 May 2022 15:35:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48356 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348481AbiEQTfT (ORCPT ); Tue, 17 May 2022 15:35:19 -0400 Received: from mail-qk1-x72a.google.com (mail-qk1-x72a.google.com [IPv6:2607:f8b0:4864:20::72a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 41E9E522D2 for ; Tue, 17 May 2022 12:35:18 -0700 (PDT) Received: by mail-qk1-x72a.google.com with SMTP id c1so15312609qkf.13 for ; Tue, 17 May 2022 12:35:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=QnbKYBhh3c63Yumph0EWjqW7Wj2wBUNjFmt4Rfdy8jc=; b=UCDLE6mdjuGa1AhVdCEcBtExr96rjGXBSfEIQfr7ykTyHhQER0s0t79knhisfx/JC1 LjKqwJmJLW3zBjmEU2Rnwt7SKxPUics0pfUJVLOHxKJJL3Q18/6zj6anFNufHe7u6Twr LNNH2zyFm1uVvNAvNrH6PLvqGI5JoCIpeafoNbKLk2ArMwb81GrFbAO0pw1kAq5TfDWw lIO8eTksc5Cgo1IbAOny3t54T3tlORvXjrZ2VxK2keaT+hG7v0H6LH8ca5anh2hlDwDE y02VhaC+GMQGeVU/EG/l6UccIUFS9muojSW9hKGhwex+CwPVJm9IvzBQ+NRJGsIXocRd rdcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=QnbKYBhh3c63Yumph0EWjqW7Wj2wBUNjFmt4Rfdy8jc=; b=1qycGQAU3ngLVQaY15A8XaPM1vEgMsXZ5AlVxjJ6Ic+mtKNni4BFHHvdNkwKjRQszW T8T4bVL7E+gpWIh4/BwNGeDSJooie5eH2/+gPzLo/jAGtaX1ZkrxcJviqA9v8kD+pKyp TahEyaM3mqQ4vAFXrabGYkQKNS9Cz5LBMBfrYq1ugCFyZlsCa9/BuH9NQaQqogprxTNZ dQIzC89tWhgPFGcwgbB1rglSlWlQ0X8V0NUkDWBBolbNJedTz29n+qFjmVB+r66xAc/I v/2QCu51jymzJ4AiGDkD7mWNbZX5o3Q9PdXVEJzYJkFCOg//5tTYpqbQrcHmwEvArLQ1 Wygg== X-Gm-Message-State: AOAM530H/Rv6Je9tDLJUmYTo+gKleP7Wg8zLW17Ly57CaQ41B80YKsMg yFp0HrZQBSoOl0ay6tw6NXOq/g== X-Google-Smtp-Source: ABdhPJw0eqpSbzGKh5H8X2cDcZfGERE5Mhf/8w5a5kiJ3PoOwP56ky0cT+SyFvH1q1HRmRLcR5AZ6Q== X-Received: by 2002:a37:a04b:0:b0:69f:baff:b185 with SMTP id j72-20020a37a04b000000b0069fbaffb185mr17318830qke.176.1652816117436; Tue, 17 May 2022 12:35:17 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-142-162-113-129.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.162.113.129]) by smtp.gmail.com with ESMTPSA id f6-20020a05622a114600b002f39b99f69esm8203853qty.56.2022.05.17.12.35.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 May 2022 12:35:16 -0700 (PDT) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1nr2yR-008A2U-Qr; Tue, 17 May 2022 16:35:15 -0300 Date: Tue, 17 May 2022 16:35:15 -0300 From: Jason Gunthorpe To: Long Li Cc: KY Srinivasan , Haiyang Zhang , Stephen Hemminger , Wei Liu , Dexuan Cui , "David S. Miller" , Jakub Kicinski , Paolo Abeni , Leon Romanovsky , "linux-hyperv@vger.kernel.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-rdma@vger.kernel.org" Subject: Re: [PATCH 05/12] net: mana: Set the DMA device max page size Message-ID: <20220517193515.GN63055@ziepe.ca> References: <1652778276-2986-1-git-send-email-longli@linuxonhyperv.com> <1652778276-2986-6-git-send-email-longli@linuxonhyperv.com> <20220517145949.GH63055@ziepe.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 17, 2022 at 07:32:51PM +0000, Long Li wrote: > > Subject: Re: [PATCH 05/12] net: mana: Set the DMA device max page size > > > > On Tue, May 17, 2022 at 02:04:29AM -0700, longli@linuxonhyperv.com wrote: > > > From: Long Li > > > > > > The system chooses default 64K page size if the device does not > > > specify the max page size the device can handle for DMA. This do not > > > work well when device is registering large chunk of memory in that a > > > large page size is more efficient. > > > > > > Set it to the maximum hardware supported page size. > > > > For RDMA devices this should be set to the largest segment size an ib_sge can > > take in when posting work. It should not be the page size of MR. 2M is a weird > > number for that, are you sure it is right? > > Yes, this is the maximum page size used in hardware page tables. As I said, it should be the size of the sge in the WQE, not the "hardware page tables" Jason