Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp1547850rdh; Fri, 27 Oct 2023 19:48:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH3lzYcVPeHAhN/F0nSSCjZVoDagjWlrd0OEyGmtVTBXS+9uDtvAd5xWjmsz/7Y7UoHQ+B7 X-Received: by 2002:a05:6300:8088:b0:17f:fef8:1f3f with SMTP id ap8-20020a056300808800b0017ffef81f3fmr550426pzc.4.1698461309081; Fri, 27 Oct 2023 19:48:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698461309; cv=none; d=google.com; s=arc-20160816; b=M/0bDSWMbkRdBXfisbhx3YjTcNdeV4QDueiVMTYkMtrCG3Duw8kBKhN8EOwePdKW+d ApGtqyyPUXq484u8xvhuFEujDnog1p5EfSgSU9y/DBnJTmnki/d+7fRboxJuavKEpc18 y2W3RXZ+i7+TkQNHkJEUS3HufUW2Q/KnsEuII9CwJ1KD4OpZJ3nwGXIhpnAb/jSKwHfE nhmJoG+KgceFP+hhQ96E53UB6cdFjhp3StIMBxo5pn7IAZZPmwp7hTu/BJQMlodeQguW Jlv0XbcJ4qPRSubiMTILieEdOT24WeXvrbcs46lX3U/YX/YhOn7iPLE2+g19hAN3zLPX qa8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:subject:mime-version:date:dkim-signature :message-id; bh=LiS5gJoJXr1uvIJn0YRDnW+BVIyqW/T0Ecfm5ATtk/Q=; fh=ihpS39+eYewrODmEvhv0lSFQjNMBSYl1PeagafZYTkQ=; b=AHRy61HlwGQxN5KaNLwSABo5TF/gph/xMWhVJS8RJL7PL0X5RV7S8l/PoL8+8KIa1O CNEOOt/cYmNNOHy77qRduEbbjffvIBd/HjT/avY+g2ypMRctHZM6/IJOtXRBs6ODGUnO Kq19NeUMHWTeMWMbpDjoQAcJ/lKNlnPDbD+tg6pa300Yd9Oi73FljN1izttRAPYFrP0b WvSWimY6APnLmSVHb1oTFG7j+5x3U9seyGiOk7oYlioFxROJPenGPBvGIt3OHc4nZP+3 jmyI80tqeufukhR82s76vpkLs6xSKPK+CwlCrW9LLqL4fRSUtprSTmd1hs2ndpY76pUb CC2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=iThagDob; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id m18-20020a170902d19200b001c3671d3151si1985185plb.92.2023.10.27.19.48.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Oct 2023 19:48:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=iThagDob; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id BAFF98212D38; Fri, 27 Oct 2023 19:48:26 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233040AbjJ1CsO (ORCPT + 99 others); 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 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Fri, 27 Oct 2023 19:48:26 -0700 (PDT) 在 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.