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 87AB1C25B67 for ; Sat, 28 Oct 2023 02:48:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232949AbjJ1CsO (ORCPT ); Fri, 27 Oct 2023 22:48:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233001AbjJ1CsN (ORCPT ); Fri, 27 Oct 2023 22:48:13 -0400 Received: from out-189.mta1.migadu.com (out-189.mta1.migadu.com [95.215.58.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54DD8CF for ; Fri, 27 Oct 2023 19:48:10 -0700 (PDT) Message-ID: <45c23e30-8405-470b-825c-e5166cd8a313@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1698461288; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LiS5gJoJXr1uvIJn0YRDnW+BVIyqW/T0Ecfm5ATtk/Q=; b=iThagDobBCOkgZ5mOT3iQCDgW7Ato7fhIIe2r1oieOYNrIsUHyhVeE+MfwFfOlH9XsS0F4 YOK78tei8SSOLP9Wc+VFvjv252qRsyLS44Rrgs1Sepn4rZEmKS2qI1pERjlecn4VNHhvQE ekM3yXLdxVbjR1xG+ehD/e0IKU8QfaU= Date: Sat, 28 Oct 2023 10:48:00 +0800 MIME-Version: 1.0 Subject: Re: [PATCH RFC 1/2] RDMA/rxe: don't allow registering !PAGE_SIZE mr To: Bart Van Assche , Li Zhijian , zyjzyj2000@gmail.com, jgg@ziepe.ca, leon@kernel.org, linux-rdma@vger.kernel.org Cc: linux-kernel@vger.kernel.org, rpearsonhpe@gmail.com, matsuda-daisuke@fujitsu.com References: <20231027054154.2935054-1-lizhijian@fujitsu.com> <53c18b2a-c3b2-4936-b654-12cb5f914622@linux.dev> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Zhu Yanjun In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 在 2023/10/28 5:46, Bart Van Assche 写道: > On 10/27/23 01:17, Zhu Yanjun wrote: >> When ULP uses folio or compound page, ULP can not work well with RXE >> after this commit is applied. > > Isn't it the responsibility of the DMA mapping code to build an sg-list > for folios? Drivers like ib_srp see an sg-list, whether that comes from A folio is a way of representing a set of physically contiguous base pages. In current implementations of folio, it seems that sg-list is not used. In Folio, some huge pages whose size is not PAGE_SIZE is dma-mapped into hardware. So the page size of folio is not equal to PAGE_SIZE. If this commit is applied, it causes potential risks to the future folio. I have developed some folio work for some NIC and RDMA drivers. In Folio, the page size of Folio is possibly not equal to PAGE_SIZE, it is multiple PAGE_SIZE. And when folio is dma-mapped to HW, the page size is equal to multiple PAGE_SIZE. In this case, ULP with folio will not work well with current RXE after this commit is applied. Removing page_size in RXE seems a plan for this problem. Zhu Yanjun > a folio or from something else. > > Bart.