Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp2046188rdh; Sat, 28 Oct 2023 20:23:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEVAfNiV1xYmhZOHHafiEaKYcLXuyTLsNKbiXCUDSAo2m5eherfzDts1GBUEt3CrGZB+UvM X-Received: by 2002:a05:6358:703:b0:168:d4c3:3447 with SMTP id e3-20020a056358070300b00168d4c33447mr7685055rwj.1.1698549801426; Sat, 28 Oct 2023 20:23:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698549801; cv=none; d=google.com; s=arc-20160816; b=M72kv8nYcMz7hxUQz9oCny82hRPM7v3WqmOizPsiXuLH3srj+nXeM1h6DqEf8+PjwF +/jCptn3XeNcDFUnoft6Dco0woH8kmOzN46ZCcdJMZUjGPYE3esn9VxqR3RudN3e+rOf omzPZUF4BShe9Q/hrPiYRLKBMi8SRqicmKlpJF2nLoC5wb5iOvCrYpIKRxP1xseuFHLS GTnh00ijizXk7rPJOKSoRtAGTJPLb8ns79M2K2IBtTCdggiitX7+qRc64Z1SijX1cNnd mKeUS0AG17PKxfyVrqwNYim7hIBHZddfgTr0b+hU8XEa7RnZC0mKukWOVhopDkshrLwp 7kow== 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=4yxBTWSsCkysQe0ogkN7X/PN6LEWWC8Vi87iPiTcgJQ=; fh=ihpS39+eYewrODmEvhv0lSFQjNMBSYl1PeagafZYTkQ=; b=Ifv4laBOMgOUa8YoThghrzv+/7XWidxyUQOd8guayC1qXYzwX21/hf9BbDol0N4kI5 mAyFyqGHmSNc6qTnWmgxL/oGZNpUqCnOpBPEKXZOz/z2D8M9ZAU6TwlJx5cBWvOfbf4E lQYYNTyEPMfTiKyW746vy6oWyvnKXl41/pmKx7wbJeWJVQFGbQmxkGmjzQH9kY9055P+ MoIgw/2RSNJVV6iYdTVbhDX+5MecjyKwvWwumYlKCaoK/kii9xY2fMgn46uOic9DCYcQ uk2hxSmlBHzczf1mIXLKV/EacpLP/4hRY7D6/sc0qa1elH4MZ47bgX0fC697JFTqufbt FASw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=vcI8DwYK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id y11-20020a170902700b00b001b9fb999147si3230958plk.89.2023.10.28.20.23.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Oct 2023 20:23:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=vcI8DwYK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (Postfix) with ESMTP id 50FEF8057477; Sat, 28 Oct 2023 20:23:18 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229529AbjJ2DXM (ORCPT + 99 others); Sat, 28 Oct 2023 23:23:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229446AbjJ2DXL (ORCPT ); Sat, 28 Oct 2023 23:23:11 -0400 X-Greylist: delayed 84612 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Sat, 28 Oct 2023 20:23:08 PDT Received: from out-185.mta0.migadu.com (out-185.mta0.migadu.com [IPv6:2001:41d0:1004:224b::b9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE19BD3 for ; Sat, 28 Oct 2023 20:23:08 -0700 (PDT) Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1698549785; 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=4yxBTWSsCkysQe0ogkN7X/PN6LEWWC8Vi87iPiTcgJQ=; b=vcI8DwYKIl6Vq53OVrTJH0bqktBueb1dak/gHHVFh6o8gxPZjDsKvmvA5ty+6aQiYsk3OF sqsjKlH3VMK1W810YUHpF/NZeVFqC8NURLt/sa/vT+yXbnwcZ7oFaOUXXMXMufTTiF2f/J g4DrDaU72HPyoNwelveNjciQvKCvbyE= Date: Sun, 29 Oct 2023 11:22:53 +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> <45c23e30-8405-470b-825c-e5166cd8a313@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 pete.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 (pete.vger.email [0.0.0.0]); Sat, 28 Oct 2023 20:23:18 -0700 (PDT) 在 2023/10/29 7:07, Bart Van Assche 写道: > On 10/27/23 19:48, Zhu Yanjun wrote: >> In this case, ULP with folio will not work well with current RXE after >> this commit is applied. > > Why not? RDMA ULPs like the SRP initiator driver use ib_map_mr_sg(). The > latter function calls rxe_map_mr_sg() if the RXE driver is used. > rxe_map_mr_sg() calls ib_sg_to_pages(). ib_sg_to_pages() translates > SG-entries that are larger than a virtual memory page into multiple > entries with size mr->page_size. It seems that we are not on the same page. I am thinking that this fix should also work for the future folio. And your idea is based on the current implementation. Perhaps it is not a good time to discuss folio currently. Let me focus on the current implementation. In this commit, if the page size is not equal to PAGE_SIZE, it will pop out warning then exit. So "rxe_info_mr" should be changed to rxe_warning_mr? In fact, I like to remove the page size assignment in rxe, that is, partly reverting the commit 325a7eb85199 ("RDMA/rxe: Cleanup page variables in rxe_mr.c"). But it seems that Jason did not like this. I no longer insist on this. I am not sure whether Jason, Leon, Bob and you have better solution to this problem or not. If not, this commit can fix this problem if no better solution. Reviewed-by: Zhu Yanjun Thanks, Zhu Yanjun > > Thanks, > > Bart. >