From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.160.176 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796076759; b=XTAfiEds8cfHuAqp8vlLrofSvnW5ypR3N9g3r/l5zYIM90zCINSG90pgz/qewj8rgOXs 9bitWvSGJYu0EQoYCOTUO2eFmf4vhvCp9vEQt/PWqQjmTeSEiejyNQpYj39a2p6biC/s5 Xk83+6RuV//TvkPjtVzLR+zbbs97+bIQbUF+Y8CpY0rWBXOs8P9vgdJzm69E1luhJmkss pDS8QRCjm/assumUzWkOXaKJfge3Z+TM+N5kcS2ujLJqjKCTIDm5UGbkvXse7QsuXA7w9 svmcOQTQS3aGW2uh3gEddrxlMzKJH6eK6sRm5WcFErCbZ+E2lmaOWN3OPW+9f2z463w== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796076759; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding; bh=yMbbooXOGO2RQkHSuysFcMDqAufpFFzsfGb0nypR/gg=; b=oH2T/dGTcEAkwEeqUmAVUzRSgNvOnRpKUlc7Vr1pN3oUF6MNbOMWeVOXcZeLVxYwdt5A wZupt0G0DqY7Ti9C6qRZVRSBeveCUAWoHJG4nB2Ddd0zrSXfqmsW4XduwPkRxeL7OzcFa SWzoF4YKj0qOKsQW/ly/EUSo5j6kfY9ur9WecOAAdjZNr18sT1vhgeE5YXVQARlVgEV3p OW5uoEtuc4md99BLCSUT3MeUPOL7eFFwCHRhef5vVOf43R2+CWlZ46ECnn+3ZvCLGWWwI Vu3BVutx2dy3d08ipOMezaY2NB+nYVKIvCZlsnn9t+2caavBwrjhKAu/2lkoZFtLqkg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=stellman-greene.com; spf=none smtp.mailfrom=stellman-greene.com; dkim=pass header.d=stellman-greene-com.20260707.gappssmtp.com header.i=@stellman-greene-com.20260707.gappssmtp.com header.a=rsa-sha256 header.s=20260707 header.b=Ai9lHkT8; arc=none smtp.remote-ip=209.85.160.176 Received: from mail-qt1-f176.google.com (mail-qt1-f176.google.com [209.85.160.176]) (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 D57C9606A336 for ; Mon, 30 Nov 2026 22:12:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org D57C9606A336 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=stellman-greene.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=stellman-greene.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=stellman-greene-com.20260707.gappssmtp.com header.i=@stellman-greene-com.20260707.gappssmtp.com header.a=rsa-sha256 header.s=20260707 header.b=Ai9lHkT8 Received: by mail-qt1-f176.google.com with SMTP id d75a77b69052e-53644b28706so155746981cf.3 for ; Mon, 30 Nov 2026 14:12:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stellman-greene-com.20260707.gappssmtp.com; s=20260707; t=1796076753; x=1796681553; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=yMbbooXOGO2RQkHSuysFcMDqAufpFFzsfGb0nypR/gg=; b=Ai9lHkT86QsE3GOyQtt4NjBpTiJJPc80i8bj5pzAqNDoesamZ8Ky3FbWKhtdaFU+K9 WKV5OLNxGCigjd40PfXQOiPe7UBCtZPSwLnY01ickfzv275JwyXIrh6RUJI4BKHNScO7 HXV4PTpJQlWwrdn7AIujYJWx7zaYC1BK/h+tffRg0LS0qb1HB/V5rrbBDZHnFVv7cnPJ dNV4jZ5DIKuAzXEH8b4oToniAbPdY/CQz9ZqT/gxaquG7BBrEFoBR2DQuSs0c/C/ipuH Q7nKeMb6RIR2r7qHp1EjLoTWoPpTXC+npuD5XAcgEXgox5ynptq6R6Nvg1Rp++g9C16c ePEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796076753; x=1796681553; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=yMbbooXOGO2RQkHSuysFcMDqAufpFFzsfGb0nypR/gg=; b=vxth9Prv0CVliarwkeKuSbrP+PJ58Rb1tCz+9gd8B1mRprV0B5Gc9wLF9W8/uVsu+4 dqn31IJ88pJdGN83FnXta0Kk7Uvc/ZmtfCtt2gDy3fF6FL/LQfFwkVJbGUV5nduKvayS 8yRMw1naAyaFYvTRyx8VaBQ0YFFwWV9SUkM/8BymPHxnF6UjLecUZd6mtnbSCCONL4Kl dgAj/Wc8iNRhtGZsbbaToHUZ10X+F7y2x36TGN7oZZeAWt+zz/9MBmNLlvZW4LRDYVLY N5U9KsugSznCXV+3wNwYCuLF5BjCm8cL2CLQtmR9PAZHY4EjHldakihsOeZuidxoXj/E WiRQ== X-Forwarded-Encrypted: i=1; AL+hErE6uWOQVPz+QYjU3LZ7zu6X3vUbbtfCHGK3Yi7csBOwqaylfcE4iIAldgQ56FuiMaogC72pgoTYLFMOIFU=@vger.kernel.org X-Gm-Message-State: APuU4Z9X1Nafn3RU4kCzqjN0J+cqLdLiTVfsOBMXHJc21V5Z+XWorE/j 6Kgit4Kif4JrO3aZL1sl+HzxnRF16/kIkOJ/ADBOM5KLBiBj4hIPXvvurbJ9EwNKTyw= X-Gm-Gg: AZFdTZcPXqujMZq9O0UPnqWXjKLVMqRRxvBhTwZKKh/+zwUSjypvYMDSJer3n/pxqzQ FQWAQmLzPWJVMIoc4o6toMz/yGcxIBx/ZQEzu8Uu75KSztrzWAj0PXlh8umFpDRAHCdwaKi6YdU RrDJL7I6uH76vLiHqv/jBFU2BCvKwwtLKEVu6hFVV/bv67b156d0lQOC8HXk6banuHysF602pQE XE2f/N/D0aRnlkbmNxFoJ9ASUcA6K8auYPMe2ec6diCO5XYx13lpRMDVFRkkKi0Y3aXTUJRb1bw E4Z3D0ibkyllTwrzrp27nSyYbI/h+AKRTG69pJcGxMBfX2d3Gi2tHdW6Bu1CbKZL2b5xXN+zaXO PuaEtiAavTSS9Wt5v639jlvhwxZUwQv3eyumYnwgKrV7bwix6kmcUvYX6Zj2UpDjmfrU+bC3tjL szXSnc9foyM5Krbjkq99maMvcfjT/cFjmDAKxppnuPKv/71zPBFZp7i6CFPwOZ8m1J+51iidiyb F1qewzKN4/8D5vo1iRGFr9qBWIqaGPTe3y+yQyI7TMZUrcvdDwxqhzS25XpD/s1/6RyEwQrRHTl kEXIvg9Uy9vyWuocmrPafqRVbSZfyWopjkxhfKy3byNizT4obdL4svnKwtm1SyYle8ZUxpfc1r+ zIQ== X-Received: by 2002:ac8:598f:0:b0:536:620e:90f7 with SMTP id d75a77b69052e-55d76a2027amr643525751cf.39.1796076752687; Mon, 30 Nov 2026 14:12:32 -0800 (PST) Received: from Mac.mynetworksettings.com ([2600:4041:5c28:200:7452:97b9:f50c:483]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-55dc7a6700csm118888831cf.7.2026.11.30.14.12.31 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 30 Nov 2026 14:12:32 -0800 (PST) From: Andrew Stellman To: Zhu Yanjun , Zhu Yanjun Cc: Li Zhijian , Jason Gunthorpe , Leon Romanovsky , linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH rdma-rc] RDMA/rxe: Bound MR copy and flush chunks to MR pages Date: Mon, 30 Nov 2026 17:12:31 -0500 Message-ID: <20261130221231.76622-1-bugs@stellman-greene.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <920a6176-c633-4e10-97aa-cde8103e94b5@linux.dev> 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> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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. > 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