From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=95.215.58.236 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796100842; b=HflFBMUgZHe03QBcI47ppoq5fExJRqx7Wii9K3yZ8KUee+80aVQkU8ZDJgmnHSEomnwK vHiKm6ttl0Hshp/kiH/bDjxLrOcsgJzg8/mkv8f/8h80CeoJU04dkYDi7NWYtE7Js+BqP ZFLr+oiUaSHEZOUE+4SsgwsmT83jF3T6qV+0JaMbu3HBCuJNhWGBqvwHwsRjmx+Ghu904 HsmqKJyjxKXLYeU9Kzl4n1bl8h0TVJeVHQnvmtXICSRMV6IYQnbO/clHNkhZkPub9PF5Z W4unetmRvD0jQFNxrw6SrEttglDSnnhUhgY5Zipdm2FV0R+J7LQIrSvZ0gLcoNuriug== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796100842; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:Message-ID:Date:MIME-Version:User-Agent: Subject:To:Cc:References:From:In-Reply-To:Content-Type: Content-Transfer-Encoding; bh=PcmBnwjNgo6uxz2C3Lhfmh/dqWSohlQp30+QVOBhg+E=; b=k5qmpvvM/HMMvm7taBu7l/aAULNG1MYWOeUaNWgT7pFDfcnZq2raihVBgsM1mspcxW3r GjaXHr20KqmmyKH74KTHxUXbBZqHw54xkkS7iU9zrsJh0ZNWnFOu9CdwTYlU1uyyseT2s 9OzHCemgZR2EKKzdilk+7DgnEIVQVj+LHFHBaTb9kt4vQ9AiJdmo8I1qZeB6KtHdZXKZC gO+3LDjArdTiDkDZi/zGmuAEporgv0XWITpiwbjQc/TfxriGFQLaeMmj5O526Qd4mnPA2 abufB/7e69JjNpXLpboJSdpelripPtF33CWYtiA4nFeZnJUdDFblG67D7sUhbbE92pw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=EBm1AXA0; arc=none smtp.remote-ip=95.215.58.236 Received: from mta1.migadu.com (out-236.mta1.migadu.com [95.215.58.236]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 46C34606A320 for ; Tue, 1 Dec 2026 04:54:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 46C34606A320 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=EBm1AXA0 X-Envelope-To: linux-rdma@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=YPFPU8IPTgMhElvMN6TvUtEmrt3gDDpnQexK1sMg1i8=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1796100839; v=1; x=1796705639; b=EBm1AXA0NSiJkMeoUycz5P/gd2s9N7TLhoWawdrSMN6XqzZQA9y8jXpuvBmDx/6nL+vzHMWh 4SCF2kPqCvdod17N+/9lVEplx8pND4Ke093rmndm/kleqAejau5k5USAV4U+7N/qh+AjIVoIQ5C neZE+f53Sadb4RZ1frTJHTvI= X-Envelope-To: linux-rdma@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id 5876d417eb850abe; Tue, 01 Dec 2026 04:53:58 +0000 X-Mizu-Trace-ID: 5876d417eb850abe X-Migadu-Flow: FLOW_OUT Message-ID: Date: Mon, 30 Nov 2026 20:53:55 -0800 X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH rdma-rc] RDMA/rxe: Bound MR copy and flush chunks to MR pages To: Andrew Stellman , Zhu Yanjun , "yanjun.zhu@linux.dev" Cc: Li Zhijian , Jason Gunthorpe , Leon Romanovsky , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org References: <20261128140840.59003-1-bugs@stellman-greene.com> <20261129001904.79077-1-bugs@stellman-greene.com> <77aba02e-64a7-4987-80f8-46c5301ac106@linux.dev> <20261129135306.80838-1-bugs@stellman-greene.com> <87a40abe-30e3-414c-ac13-ed166c91239d@linux.dev> <20261130041003.16909-1-bugs@stellman-greene.com> <920a6176-c633-4e10-97aa-cde8103e94b5@linux.dev> <20261130221231.76622-1-bugs@stellman-greene.com> From: Zhu Yanjun In-Reply-To: <20261130221231.76622-1-bugs@stellman-greene.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 在 2026/11/30 14:12, Andrew Stellman 写道: > On Sun, Nov 29, 2026 at 08:57:43PM -0800, Zhu Yanjun wrote: >> In rxe, mr_page_size() always returns PAGE_SIZE and never changes. > I ran it to check, this time with no page-size hook. In one arm64 QEMU > guest on mainline 7.4-rc5 with 64 KiB pages and KASAN, I connected the > NVMe/RDMA host to an nvmet-rdma target over rxe. The only test change > was a pr_info in rxe_map_mr_sg(), and during direct I/O it logged > mr_page_size=4096 and PAGE_SIZE=65536. > > With a 512-byte-sector namespace and eight scattered iovecs, reading > the data back failed at the first byte of the second iovec in each of > three ten-round runs. With this patch applied, all ten rounds passed > in each of three runs, and going back to the unpatched module brought > the same failure back. Aligned 4 KiB I/O passed with both. > > So on this path the MR page size isn't PAGE_SIZE, and without this > patch the data read back is wrong. Interesting. Would you like to add logs to check if the returned value of the function mr_page_size is changed? Based on your commit, we just need to compare PAGE_SIZE with mr_page_size. +        unsigned int chunk = min_t(unsigned int, PAGE_SIZE, +                       mr_page_size(mr)) - page_offset; Thanks a lot. Yanjun Zhu > >> If you intend to support different page_size values in rxe, patches >> implementing that feature would be very welcome. >> >> From my perspective, however, the current patch does not yet actually >> deliver that capability. > The patch isn't trying to add support for another page size. > rxe_map_mr_sg() already accepts the 4 KiB MR pages nvme-rdma asks for > on this kernel, as the log above shows, and the patch fixes the copy > for that case. > > I can send you the test program, setup scripts and logs off-list if > you'd like to run it. > > Andrew -- Best Regards, Yanjun.Zhu