[PATCH net-next v1 2/2] selftests: pp-bench: remove page_pool_put_page wrapper

2025-06-27 Thread Mina Almasry
Minor cleanup: remove the pointless looking _ wrapper around page_pool_put_page, and just do the call directly. Signed-off-by: Mina Almasry --- .../net/bench/page_pool/bench_page_pool_simple.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/tools/testing

[PATCH net-next v1 1/2] selftests: pp-bench: remove unneeded linux/version.h

2025-06-27 Thread Mina Almasry
linux/version.h was used by the out-of-tree version, but not needed in the upstream one anymore. While I'm at it, sort the includes. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202506271434.gk0epc9h-...@intel.com/ Signed-off-by: Mina Almasry --- .../self

Re: [PATCH net-next v5] page_pool: import Jesper's page_pool benchmark

2025-06-26 Thread Mina Almasry
On Thu, Jun 26, 2025 at 8:23 AM Jakub Kicinski wrote: > > On Wed, 25 Jun 2025 17:22:56 -0700 Mina Almasry wrote: > > What I'm hoping to do is: > > > > 1. Have nipa run the benchmark always (or at least on patches that > > touch pp code, if that's poss

Re: [PATCH net-next v5] page_pool: import Jesper's page_pool benchmark

2025-06-25 Thread Mina Almasry
On Mon, Jun 23, 2025 at 6:19 PM wrote: > > Hello: > > This patch was applied to netdev/net-next.git (main) > by Jakub Kicinski : > > On Thu, 19 Jun 2025 18:15:18 + you wrote: > > From: Jesper Dangaard Brouer > > > > We frequently consult with Jesper's out-of-tree page_pool benchmark to > > ev

Re: [PATCH net-next v5] page_pool: import Jesper's page_pool benchmark

2025-06-25 Thread Mina Almasry
On Wed, Jun 25, 2025 at 5:03 PM Jakub Kicinski wrote: > > On Wed, 25 Jun 2025 16:45:49 -0700 Mina Almasry wrote: > > Thank you for merging this. Kinda of a noob question: does this merge > > mean that nipa will run this on new submitted patches already? Or do > > I/someone

[PATCH net-next v5] page_pool: import Jesper's page_pool benchmark

2025-06-19 Thread Mina Almasry
/kernel/configs, and some variance may be there from run to run due to some noise. Cc: Jesper Dangaard Brouer Cc: Ilias Apalodimas Cc: Jakub Kicinski Cc: Toke Høiland-Jørgensen Signed-off-by: Mina Almasry Acked-by: Ilias Apalodimas Signed-off-by: Jesper Dangaard Brouer --- v

Re: [PATCH net-next v4] page_pool: import Jesper's page_pool benchmark

2025-06-19 Thread Mina Almasry
On Thu, Jun 19, 2025 at 9:58 AM Jakub Kicinski wrote: > > On Thu, 19 Jun 2025 08:37:05 -0700 Mina Almasry wrote: > > Jakub, this patch was marked 'changes requested' for good reason, but > > after investigation we found the patch itself is good and the issues > >

Re: [PATCH net-next v4] page_pool: import Jesper's page_pool benchmark

2025-06-19 Thread Mina Almasry
On Thu, Jun 19, 2025 at 3:24 AM Jesper Dangaard Brouer wrote: > > Does this alleviate your concern? Or do you still see an issue here? > > There is still a delta between our results, on different > > hardware/configs but results are in a sane range now. > > Now the results a sane and in range :-)

Re: [PATCH net-next v4] page_pool: import Jesper's page_pool benchmark

2025-06-18 Thread Mina Almasry
On Wed, Jun 18, 2025 at 5:46 AM Jesper Dangaard Brouer wrote: > >> Something is off with benchmark numbers compared to the OOT version. > >> > > > > I assume you're comparing my results (my kernel config + my hardware + > > upstream benchmark) with your results (your kernel config + your > > hardw

Re: [PATCH net-next v4] page_pool: import Jesper's page_pool benchmark

2025-06-16 Thread Mina Almasry
On Mon, Jun 16, 2025 at 2:29 AM Jesper Dangaard Brouer wrote: > On 15/06/2025 22.59, Mina Almasry wrote: > > From: Jesper Dangaard Brouer > > > > We frequently consult with Jesper's out-of-tree page_pool benchmark to > > evaluate page_pool changes. > > >

[PATCH net-next v4] page_pool: import Jesper's page_pool benchmark

2025-06-15 Thread Mina Almasry
: Jakub Kicinski Cc: Toke Høiland-Jørgensen Signed-off-by: Mina Almasry Acked-by: Ilias Apalodimas Signed-off-by: Jesper Dangaard Brouer --- v4: https://lore.kernel.org/netdev/20250614100853.3f237...@kernel.org/ - Fix more checkpatch and coccicheck issues (Jakub) v3: - Non RFC - Collect S

[PATCH net-next v2 3/3] selftests: devmem: add ipv4 support to chunks test

2025-06-15 Thread Mina Almasry
Add ipv4 support to the recently added chunks tests, which was added as ipv6 only. Signed-off-by: Mina Almasry --- tools/testing/selftests/drivers/net/hw/devmem.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/drivers/net/hw/devmem.py b/tools

[PATCH net-next v2 2/3] selftests: devmem: remove unused variable

2025-06-15 Thread Mina Almasry
Trivial fix to unused variable. Signed-off-by: Mina Almasry --- tools/testing/selftests/drivers/net/hw/ncdevmem.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftests/drivers/net/hw/ncdevmem.c b/tools/testing/selftests/drivers/net/hw/ncdevmem.c index 02e4d3d7ded2

[PATCH net-next v2 1/3] netmem: fix netmem comments

2025-06-15 Thread Mina Almasry
Trivial fix to a couple of outdated netmem comments. No code changes, just more accurately describing current code. Signed-off-by: Mina Almasry --- v2: https://lore.kernel.org/netdev/20250613042804.3259045-2-almasrym...@google.com/ - Adjust comment for clearing lsb as (Jakub) --- include/net

[PATCH net-next v3] page_pool: import Jesper's page_pool benchmark

2025-06-13 Thread Mina Almasry
: Jakub Kicinski Cc: Toke Høiland-Jørgensen Signed-off-by: Mina Almasry Acked-by: Ilias Apalodimas Signed-off-by: Jesper Dangaard Brouer --- v3: - Non RFC - Collect Signed-off-by from Jesper and Acked-by Ilias. - Move test_bench_page_pool.sh to address nipa complaint. - Remove `static i

[PATCH net-next v1 4/4] selftests: devmem: add ipv4 support to chunks test

2025-06-12 Thread Mina Almasry
Add ipv4 support to the recently added chunks tests, which was added as ipv6 only. Signed-off-by: Mina Almasry --- tools/testing/selftests/drivers/net/hw/devmem.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/drivers/net/hw/devmem.py b/tools

[PATCH net-next v1 3/4] selftests: devmem: remove unused variable

2025-06-12 Thread Mina Almasry
Trivial fix to unused variable. Signed-off-by: Mina Almasry --- tools/testing/selftests/drivers/net/hw/ncdevmem.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftests/drivers/net/hw/ncdevmem.c b/tools/testing/selftests/drivers/net/hw/ncdevmem.c index 02e4d3d7ded2

[PATCH net-next v1 2/4] netmem: fix netmem comments

2025-06-12 Thread Mina Almasry
Trivial fix to a couple of outdated netmem comments. No code changes, just more accurately describing current code. Signed-off-by: Mina Almasry --- include/net/netmem.h | 21 - 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/include/net/netmem.h b/include/net

[PATCH net-next v1 1/4] net: netmem: fix skb_ensure_writable with unreadable skbs

2025-06-12 Thread Mina Almasry
net: add support for skbs with unreadable frags") Signed-off-by: Mina Almasry --- net/core/skbuff.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 85fc82f72d26..d6420b74ea9c 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c

Re: [PATCH RFC net-next v2] page_pool: import Jesper's page_pool benchmark

2025-05-28 Thread Mina Almasry
On Wed, May 28, 2025 at 2:28 AM Toke Høiland-Jørgensen wrote: > > Mina Almasry writes: > > > On Mon, May 26, 2025 at 5:51 AM Toke Høiland-Jørgensen > > wrote: > >> > Fast path results: > >> > no-softirq-page_pool01 Per elem: 11 cycles(tsc) 4.368

Re: [PATCH RFC net-next v2] page_pool: import Jesper's page_pool benchmark

2025-05-27 Thread Mina Almasry
th results: > > no-softirq-page_pool03 Per elem: 549 cycles(tsc) 203.466 ns > > ``` > > > > Cc: Jesper Dangaard Brouer > > Cc: Ilias Apalodimas > > Cc: Jakub Kicinski > > Cc: Toke Høiland-Jørgensen > > > > Signed-off-by: Mina Almasry > >

[PATCH RFC net-next v2] page_pool: import Jesper's page_pool benchmark

2025-05-24 Thread Mina Almasry
: Jakub Kicinski Cc: Toke Høiland-Jørgensen Signed-off-by: Mina Almasry --- v2: - Move under tools/selftests (Jakub) - Create ksft for it. - Remove the tasklet logic no longer needed (Jesper + Toke) RFC discussion points: - Desirable to import it? - Can the benchmark be imported as-is for an i

[PATCH net-next v2 3/8] net: devmem: preserve sockc_err

2025-05-23 Thread Mina Almasry
Preserve the error code returned by sock_cmsg_send and return that on err. Signed-off-by: Mina Almasry --- v2: - Remove unnecessary !! (Stan) --- net/ipv4/tcp.c | 24 ++-- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index

[PATCH net-next v2 2/8] page_pool: fix ugly page_pool formatting

2025-05-23 Thread Mina Almasry
Minor cleanup; this line is badly formatted. Signed-off-by: Mina Almasry --- net/core/page_pool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/core/page_pool.c b/net/core/page_pool.c index 974f3eef2efa..4011eb305cee 100644 --- a/net/core/page_pool.c +++ b/net

[PATCH net-next v2 8/8] net: devmem: ncdevmem: remove unused variable

2025-05-23 Thread Mina Almasry
This variable is unused and can be removed. Signed-off-by: Mina Almasry Acked-by: Stanislav Fomichev --- tools/testing/selftests/drivers/net/hw/ncdevmem.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftests/drivers/net/hw/ncdevmem.c b/tools/testing/selftests/drivers/net

[PATCH net-next v2 7/8] net: devmem: ksft: upgrade rx test to send 1K data

2025-05-23 Thread Mina Almasry
te pattern received. All this debug information will be useful when the test fails. Signed-off-by: Mina Almasry Acked-by: Stanislav Fomichev --- tools/testing/selftests/drivers/net/hw/devmem.py | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/driv

[PATCH net-next v2 6/8] net: devmem: ksft: add 5 tuple FS support

2025-05-23 Thread Mina Almasry
ncdevmem supports drivers that are limited to either 3-tuple or 5-tuple FS support, but the ksft is currently 3-tuple only. Support drivers that have 5-tuple FS supported by adding a ksft arg. Signed-off-by: Mina Almasry fix 5-tuple fix 5-tuple --- tools/testing/selftests/drivers/net/hw

[PATCH net-next v2 4/8] net: devmem: ksft: add ipv4 support

2025-05-23 Thread Mina Almasry
ncdevmem supports both ipv4 and ipv6, but the ksft is currently ipv6-only. Propagate the ipv4 support to the ksft, so that folks that are limited to these networks can also test. Signed-off-by: Mina Almasry --- v2: - Use cfg.addr and cfg.remote_addr instead of doing ipv4 and ipv6 special

[PATCH net-next v2 5/8] net: devmem: ksft: add exit_wait to make rx test pass

2025-05-23 Thread Mina Almasry
This exit_wait seems necessary to make the rx side test pass for me. I think this is just missed from the original test add patch. Add it now. Signed-off-by: Mina Almasry Acked-by: Stanislav Fomichev --- tools/testing/selftests/drivers/net/hw/devmem.py | 2 +- 1 file changed, 1 insertion

[PATCH net-next v2 1/8] net: devmem: move list_add to net_devmem_bind_dmabuf.

2025-05-23 Thread Mina Almasry
It's annoying for the list_add to be outside net_devmem_bind_dmabuf, but the list_del is in net_devmem_unbind_dmabuf. Make it consistent by having both the list_add/del be inside the net_devmem_[un]bind_dmabuf. Cc: ap420...@gmail.com Signed-off-by: Mina Almasry Tested-by: Taehee Yoo ---

[PATCH net-next v2 0/8] Devmem TCP minor cleanups and ksft improvements

2025-05-23 Thread Mina Almasry
flow steering. - Improve test by sending 1K data instead of just "hello\nworld" Cc: s...@fomichev.me Cc: ap420...@gmail.com Cc: pr...@google.com Cc: shivajik...@google.com Mina Almasry (8): net: devmem: move list_add to net_devmem_bind_dmabuf. page_pool: fix ugly page_pool formattin

Re: [PATCH net-next 2/3] selftests: ncdevmem: make chunking optional

2025-05-21 Thread Mina Almasry
On Wed, May 21, 2025 at 10:39 AM Stanislav Fomichev wrote: > > On 05/21, Mina Almasry wrote: > > On Tue, May 20, 2025 at 1:30 PM Stanislav Fomichev > > wrote: > > > > > > Add new -z argument to specify max IOV size. By default, use > > > single la

Re: [PATCH net-next 1/3] net: devmem: support single IOV with sendmsg

2025-05-21 Thread Mina Almasry
On Wed, May 21, 2025 at 10:33 AM Stanislav Fomichev wrote: > > On 05/21, Mina Almasry wrote: > > On Tue, May 20, 2025 at 1:30 PM Stanislav Fomichev > > wrote: > > > > > > sendmsg() with a single iov becomes ITER_UBUF, sendmsg() with multiple > > > i

Re: [PATCH net-next 3/3] selftests: ncdevmem: add tx test with multiple IOVs

2025-05-21 Thread Mina Almasry
ng we'd add the test coverage without the need to add test cases to the ksft. I was thinking maybe ncdevmem can do rand() each sendmsg loop and send a different set of chunks, so that we don't need a flag. But it may be too hacky to have the test be non-deterministic, so up to you Acked-by: Mina Almasry -- Thanks, Mina

Re: [PATCH net-next 2/3] selftests: ncdevmem: make chunking optional

2025-05-21 Thread Mina Almasry
On Tue, May 20, 2025 at 1:30 PM Stanislav Fomichev wrote: > > Add new -z argument to specify max IOV size. By default, use > single large IOV. > > Signed-off-by: Stanislav Fomichev > --- > .../selftests/drivers/net/hw/ncdevmem.c | 49 +++ > 1 file changed, 29 insertions(+),

Re: [PATCH net-next 1/3] net: devmem: support single IOV with sendmsg

2025-05-21 Thread Mina Almasry
Pavel Begunkov > Cc: Mina Almasry > Fixes: bd61848900bf ("net: devmem: Implement TX path") > Signed-off-by: Stanislav Fomichev > --- > include/linux/uio.h | 8 +++- > net/core/datagram.c | 3 ++- > 2 files changed, 9 insertions(+), 2 deletions(-) > > diff

Re: [PATCH net-next v1 7/9] net: devmem: ksft: add 5 tuple FS support

2025-05-19 Thread Mina Almasry
On Mon, May 19, 2025 at 8:37 AM Stanislav Fomichev wrote: > > On 05/19, Mina Almasry wrote: > > ncdevmem supports drivers that are limited to either 3-tuple or 5-tuple > > FS support, but the ksft is currently 3-tuple only. Support drivers that > > have 5-tuple FS suppor

Re: [PATCH net-next v1 5/9] net: devmem: ksft: add ipv4 support

2025-05-19 Thread Mina Almasry
On Mon, May 19, 2025 at 8:32 AM Stanislav Fomichev wrote: > > On 05/19, Mina Almasry wrote: > > ncdevmem supports both ipv4 and ipv6, but the ksft is currently > > ipv6-only. Propagate the ipv4 support to the ksft, so that folks that > > are limited to these networks can a

Re: [PATCH net-next v1 4/9] net: devmem: ksft: remove ksft_disruptive

2025-05-19 Thread Mina Almasry
On Mon, May 19, 2025 at 8:25 AM Stanislav Fomichev wrote: > > On 05/19, Mina Almasry wrote: > > As far as I can tell the ksft_disruptive here is unnecessary. These > > tests are largerly independent, and when one test fails, it's nice to > > know the results from all

[PATCH net-next v1 9/9] net: devmem: ncdevmem: remove unused variable

2025-05-18 Thread Mina Almasry
This variable is unused and can be removed. Signed-off-by: Mina Almasry --- tools/testing/selftests/drivers/net/hw/ncdevmem.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/testing/selftests/drivers/net/hw/ncdevmem.c b/tools/testing/selftests/drivers/net/hw/ncdevmem.c index

[PATCH net-next v1 0/9] Devmem TCP minor cleanups and ksft improvements

2025-05-18 Thread Mina Almasry
t are limited to 5-tuple flow steering. - Improve test by sending 1K data instead of just "hello\nworld" Cc: s...@fomichev.me Cc: ap420...@gmail.com Cc: pr...@google.com Cc: shivajik...@google.com Mina Almasry (9): net: devmem: move list_add to net_devmem_bind_dmabuf. page_pool: fix

[PATCH net-next v1 6/9] net: devmem: ksft: add exit_wait to make rx test pass

2025-05-18 Thread Mina Almasry
This exit_wait seems necessary to make the rx side test pass for me. I think this is just missed from the original test add patch. Add it now. Signed-off-by: Mina Almasry --- tools/testing/selftests/drivers/net/hw/devmem.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH net-next v1 7/9] net: devmem: ksft: add 5 tuple FS support

2025-05-18 Thread Mina Almasry
ncdevmem supports drivers that are limited to either 3-tuple or 5-tuple FS support, but the ksft is currently 3-tuple only. Support drivers that have 5-tuple FS supported by adding a ksft arg. Signed-off-by: Mina Almasry --- .../testing/selftests/drivers/net/hw/devmem.py | 17

[PATCH net-next v1 1/9] net: devmem: move list_add to net_devmem_bind_dmabuf.

2025-05-18 Thread Mina Almasry
It's annoying for the list_add to be outside net_devmem_bind_dmabuf, but the list_del is in net_devmem_unbind_dmabuf. Make it consistent by having both the list_add/del be inside the net_devmem_[un]bind_dmabuf. Cc: ap420...@gmail.com Signed-off-by: Mina Almasry --- net/core/devmem.c

[PATCH net-next v1 8/9] net: devmem: ksft: upgrade rx test to send 1K data

2025-05-18 Thread Mina Almasry
te pattern received. All this debug information will be useful when the test fails. Signed-off-by: Mina Almasry --- tools/testing/selftests/drivers/net/hw/devmem.py | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/drivers/net/hw/devmem.py b/too

[PATCH net-next v1 5/9] net: devmem: ksft: add ipv4 support

2025-05-18 Thread Mina Almasry
ncdevmem supports both ipv4 and ipv6, but the ksft is currently ipv6-only. Propagate the ipv4 support to the ksft, so that folks that are limited to these networks can also test. Signed-off-by: Mina Almasry --- .../selftests/drivers/net/hw/devmem.py| 33 --- 1 file

[PATCH net-next v1 3/9] net: devmem: preserve sockc_err

2025-05-18 Thread Mina Almasry
Preserve the error code returned by sock_cmsg_send and return that on err. Signed-off-by: Mina Almasry --- net/ipv4/tcp.c | 24 ++-- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index b7b6ab41b496..45abe5772157 100644 --- a

[PATCH net-next v1 4/9] net: devmem: ksft: remove ksft_disruptive

2025-05-18 Thread Mina Almasry
As far as I can tell the ksft_disruptive here is unnecessary. These tests are largerly independent, and when one test fails, it's nice to know the results from all the other test cases. Signed-off-by: Mina Almasry --- tools/testing/selftests/drivers/net/hw/devmem.py | 3 --- 1 file chang

[PATCH net-next v1 2/9] page_pool: fix ugly page_pool formatting

2025-05-18 Thread Mina Almasry
Minor cleanup; this line is badly formatted. Signed-off-by: Mina Almasry --- net/core/page_pool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/core/page_pool.c b/net/core/page_pool.c index 974f3eef2efa..4011eb305cee 100644 --- a/net/core/page_pool.c +++ b/net

Re: [PATCH net-next v1 2/7] net: page_pool: create page_pool_alloc_netmem

2024-11-07 Thread Mina Almasry
On Sun, Nov 3, 2024 at 6:35 AM Yunsheng Lin wrote: > > On 11/1/2024 9:10 PM, Mina Almasry wrote: > > ... > > >> > >> Isn't it a little odd that old and new are not following the same > >> pattern? > > > > Hi Yunsheng, > &g

Re: [PATCH net-next v1 6/7] net: fix SO_DEVMEM_DONTNEED looping too long

2024-11-05 Thread Mina Almasry
On Tue, Nov 5, 2024 at 1:46 PM Stanislav Fomichev wrote: > > > > Also, the information is useless to the user. If the user sees 'frag > > > > 128 failed to free'. There is nothing really the user can do to > > > > recover at runtime. Only usefulness that could come is for the user to > > > > log t

Re: [PATCH net-next v1 6/7] net: fix SO_DEVMEM_DONTNEED looping too long

2024-11-05 Thread Mina Almasry
On Wed, Oct 30, 2024 at 8:07 AM Stanislav Fomichev wrote: > > On 10/30, Mina Almasry wrote: > > On Wed, Oct 30, 2024 at 7:33 AM Stanislav Fomichev > > wrote: > > > > > > On 10/29, Mina Almasry wrote: > > > > Check we're going to free a rea

Re: [PATCH net-next v1 0/7] devmem TCP fixes

2024-11-01 Thread Mina Almasry
On Thu, Oct 31, 2024 at 7:42 PM Jakub Kicinski wrote: > > On Tue, 29 Oct 2024 20:55:20 +0000 Mina Almasry wrote: > > A few unrelated devmem TCP fixes bundled in a series for some > > convenience (if that's ok). > > These two should go to net I presume? It's mi

Re: [PATCH net-next v1 2/7] net: page_pool: create page_pool_alloc_netmem

2024-11-01 Thread Mina Almasry
On Fri, Nov 1, 2024 at 4:14 AM Yunsheng Lin wrote: > > On 2024/10/30 4:45, Mina Almasry wrote: > > Create page_pool_alloc_netmem to be the mirror of page_pool_alloc. > > > > This enables drivers that want currently use page_pool_alloc to > > transition to netmem b

Re: [PATCH net-next v6 00/12] selftests: ncdevmem: Add ncdevmem to ksft

2024-10-31 Thread Mina Almasry
On Thu, Oct 31, 2024 at 9:45 AM Mina Almasry wrote: > ... > > Sorry, 2 issues testing this series: > ... > > 2. Validation is now broken: > Validation is re-fixed with this diff: diff --git a/tools/testing/selftests/drivers/net/hw/ncdevmem.c b/tools/testing/selftests/driv

Re: [PATCH net-next v6 00/12] selftests: ncdevmem: Add ncdevmem to ksft

2024-10-31 Thread Mina Almasry
On Wed, Oct 30, 2024 at 8:37 AM Stanislav Fomichev wrote: > > On 10/30, Mina Almasry wrote: > > On Wed, Oct 30, 2024 at 8:13 AM Stanislav Fomichev > > wrote: > > > > > > On 10/30, Mina Almasry wrote: > > > > On Wed, Oct 30, 20

Re: [PATCH net-next v1 6/7] net: fix SO_DEVMEM_DONTNEED looping too long

2024-10-30 Thread Mina Almasry
On Wed, Oct 30, 2024 at 7:33 AM Stanislav Fomichev wrote: > > On 10/29, Mina Almasry wrote: > > Check we're going to free a reasonable number of frags in token_count > > before starting the loop, to prevent looping too long. > > > > Also minor code cl

Re: [PATCH net-next v6 00/12] selftests: ncdevmem: Add ncdevmem to ksft

2024-10-30 Thread Mina Almasry
On Wed, Oct 30, 2024 at 8:13 AM Stanislav Fomichev wrote: > > On 10/30, Mina Almasry wrote: > > On Wed, Oct 30, 2024 at 7:27 AM Stanislav Fomichev wrote: > > > > > > The goal of the series is to simplify and make it possible to use > > > ncdevmem in an aut

Re: [PATCH net-next v6 00/12] selftests: ncdevmem: Add ncdevmem to ksft

2024-10-30 Thread Mina Almasry
On Wed, Oct 30, 2024 at 7:27 AM Stanislav Fomichev wrote: > > The goal of the series is to simplify and make it possible to use > ncdevmem in an automated way from the ksft python wrapper. > > ncdevmem is slowly mutated into a state where it uses stdout > to print the payload and the python wrappe

[PATCH net-next v1 0/7] devmem TCP fixes

2024-10-29 Thread Mina Almasry
yzbot SO_DEVMEM_DONTNEED issue and add test for this case. Mina Almasry (6): net: page_pool: rename page_pool_alloc_netmem to *_netmems net: page_pool: create page_pool_alloc_netmem page_pool: disable sync for cpu for dmabuf memory provider netmem: add netmem_prefetch net: fix SO_DEVMEM_DON

[PATCH net-next v1 1/7] net: page_pool: rename page_pool_alloc_netmem to *_netmems

2024-10-29 Thread Mina Almasry
page_pool_alloc_netmem (without an s) was the mirror of page_pool_alloc_pages (with an s), which was confusing. Rename to page_pool_alloc_netmems so it's the mirror of page_pool_alloc_pages. Signed-off-by: Mina Almasry --- include/net/page_pool/types.h | 2 +- net/core/page_pool.c

[PATCH net-next v1 2/7] net: page_pool: create page_pool_alloc_netmem

2024-10-29 Thread Mina Almasry
Create page_pool_alloc_netmem to be the mirror of page_pool_alloc. This enables drivers that want currently use page_pool_alloc to transition to netmem by converting the call sites to page_pool_alloc_netmem. Signed-off-by: Mina Almasry --- include/net/page_pool/helpers.h | 25

[PATCH net-next v1 7/7] ncdevmem: add test for too many token_count

2024-10-29 Thread Mina Almasry
Add test for fixed issue: user passing a token with a very large token_count. Expect an error in this case. Signed-off-by: Mina Almasry --- tools/testing/selftests/net/ncdevmem.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/tools/testing/selftests/net/ncdevmem.c b/tools

[PATCH net-next v1 6/7] net: fix SO_DEVMEM_DONTNEED looping too long

2024-10-29 Thread Mina Almasry
Check we're going to free a reasonable number of frags in token_count before starting the loop, to prevent looping too long. Also minor code cleanups: - Flip checks to reduce indentation. - Use sizeof(*tokens) everywhere for consistentcy. Cc: Yi Lai Signed-off-by: Mina Almasry --- net

[PATCH net-next v1 5/7] netmem: add netmem_prefetch

2024-10-29 Thread Mina Almasry
prefect(page) is a common thing to be called from drivers. Add netmem_prefetch that can be called on generic netmem. Skips the prefetch for net_iovs. Signed-off-by: Mina Almasry --- include/net/netmem.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/include/net/netmem.h b/include

[PATCH net-next v1 4/7] page_pool: disable sync for cpu for dmabuf memory provider

2024-10-29 Thread Mina Almasry
r_cpu: page_pool_dma_sync_for_cpu. Upgrade this existing helper to handle netmem, and have it skip dma_sync if the memory is from a dmabuf memory provider. Drivers should migrate to using this helper when adding support for netmem. Cc: Jason Gunthorpe Signed-off-by: Mina Almasry --- include/net/page

[PATCH net-next v1 3/7] page_pool: Set `dma_sync` to false for devmem memory provider

2024-10-29 Thread Mina Almasry
Khawaja Signed-off-by: Mina Almasry --- net/core/devmem.c| 9 - net/core/page_pool.c | 3 +++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/net/core/devmem.c b/net/core/devmem.c index 11b91c12ee11..826d0b00159f 100644 --- a/net/core/devmem.c +++ b/net/core/devmem.c

[PATCH net-next v1 0/7] devmem TCP fixes

2024-10-29 Thread Mina Almasry
yzbot SO_DEVMEM_DONTNEED issue and add test for this case. Mina Almasry (6): net: page_pool: rename page_pool_alloc_netmem to *_netmems net: page_pool: create page_pool_alloc_netmem page_pool: disable sync for cpu for dmabuf memory provider netmem: add netmem_prefetch net: fix SO_DEVMEM_DON

Re: [PATCH] selftests: make kselftest-clean remove libynl outputs

2024-10-08 Thread Mina Almasry
referenced patch doesn't touch ynl.mk, but adds a dependency on it > Signed-off-by: Greg Thelen Thank you Greg, Reviewed-by: Mina Almasry -- Thanks, Mina

Re: [PATCH net-next] page_pool: add a test module for page_pool

2024-09-09 Thread Mina Almasry
On Mon, Sep 9, 2024 at 2:25 AM Yunsheng Lin wrote: > > The testing is done by ensuring that the page allocated from > the page_pool instance is pushed into a ptr_ring instance in > a kthread/napi binded to a specified cpu, and a kthread/napi > binded to a specified cpu will pop the page from the p

Re: [PATCH net-next v3 2/3] net: introduce abstraction for network memory

2024-01-04 Thread Mina Almasry
On Thu, Jan 4, 2024 at 1:44 PM Jakub Kicinski wrote: > > On Thu, 21 Dec 2023 15:44:22 -0800 Mina Almasry wrote: > > The warning is like so: > > > > ./include/net/page_pool/helpers.h: In function ‘page_pool_alloc’: > > ./include/linux/stddef.h:8:14: warning: returnin

[PATCH net-next v3] vsock/virtio: use skb_frag_*() helpers

2024-01-02 Thread Mina Almasry
Minor fix for virtio: code wanting to access the fields inside an skb frag should use the skb_frag_*() helpers, instead of accessing the fields directly. This allows for extensions where the underlying memory is not a page. Acked-by: Stefano Garzarella Signed-off-by: Mina Almasry --- v3

Re: [PATCH net-next v3 2/3] net: introduce abstraction for network memory

2023-12-21 Thread Mina Almasry
On Thu, Dec 21, 2023 at 3:23 PM Shakeel Butt wrote: > > On Wed, Dec 20, 2023 at 01:45:01PM -0800, Mina Almasry wrote: > > Add the netmem_ref type, an abstraction for network memory. > > > > To add support for new memory types to the net stack, we must first > > ab

[PATCH net-next v3 3/3] net: add netmem_ref to skb_frag_t

2023-12-20 Thread Mina Almasry
a debug assert that the skb frag is indeed backed by a page, and do a cast. Add skb[_frag]_fill_netmem_*() and skb_add_rx_frag_netmem() helpers so that the API can be used to create netmem skbs. Signed-off-by: Mina Almasry --- v3; - Renamed the fields in skb_frag_t. v2: - Add skb frag filling

[PATCH net-next v3 2/3] net: introduce abstraction for network memory

2023-12-20 Thread Mina Almasry
truct page underneath. In parallel there is an undergoing effort to add support for devmem to the net stack: https://lore.kernel.org/netdev/20231208005250.2910004-1-almasrym...@google.com/ Signed-off-by: Mina Almasry --- v3: - Modify struct netmem from a union of struct page + new types to

[PATCH net-next v3 1/3] vsock/virtio: use skb_frag_*() helpers

2023-12-20 Thread Mina Almasry
Minor fix for virtio: code wanting to access the fields inside an skb frag should use the skb_frag_*() helpers, instead of accessing the fields directly. This allows for extensions where the underlying memory is not a page. Signed-off-by: Mina Almasry --- v2: - Also fix skb_frag_off

[PATCH net-next v3 0/3] Abstract page from net stack

2023-12-20 Thread Mina Almasry
tt Cc: Yunsheng Lin Cc: Willem de Bruijn Mina Almasry (3): vsock/virtio: use skb_frag_*() helpers net: introduce abstraction for network memory net: add netmem_ref to skb_frag_t include/linux/skbuff.h | 92 ++-- include/net/netmem.h | 41

Re: [PATCH net-next v2 3/3] net: add netmem_t to skb_frag_t

2023-12-18 Thread Mina Almasry
On Mon, Dec 18, 2023 at 4:39 AM Yunsheng Lin wrote: > > On 2023/12/17 16:09, Mina Almasry wrote: > > Use netmem_t instead of page directly in skb_frag_t. Currently netmem_t > > is always a struct page underneath, but the abstraction allows efforts > > to add support for

[PATCH net-next v2 3/3] net: add netmem_t to skb_frag_t

2023-12-17 Thread Mina Almasry
, add a debug assert that the skb frag is indeed backed by a page, and do a cast. Add skb[_frag]_fill_netmem_*() and skb_add_rx_frag_netmem() helpers so that the API can be used to create netmem skbs. Signed-off-by: Mina Almasry --- v2: - Add skb frag filling helpers. --- include/linux/skbuff.h

[PATCH net-next v2 2/3] net: introduce abstraction for network memory

2023-12-17 Thread Mina Almasry
is always a struct page underneath. In parallel there is an undergoing effort to add support for devmem to the net stack: https://lore.kernel.org/netdev/20231208005250.2910004-1-almasrym...@google.com/ Signed-off-by: Mina Almasry --- v2: - Use container_of instead of a type cast (David). --

[PATCH net-next v2 1/3] vsock/virtio: use skb_frag_*() helpers

2023-12-17 Thread Mina Almasry
Minor fix for virtio: code wanting to access the fields inside an skb frag should use the skb_frag_*() helpers, instead of accessing the fields directly. This allows for extensions where the underlying memory is not a page. Signed-off-by: Mina Almasry --- v2: - Also fix skb_frag_off

[PATCH net-next v2 0/3] Abstract page from net stack

2023-12-17 Thread Mina Almasry
0004-1-almasrym...@google.com/ Cc: Jason Gunthorpe Cc: Christian König Cc: Shakeel Butt Cc: Yunsheng Lin Cc: Willem de Bruijn Mina Almasry (3): vsock/virtio: use skb_frag_*() helpers net: introduce abstraction for network memory net: add netmem_t to skb_frag_t include/linux/skbuff.h

Re: [PATCH v1] virtio_pmem: populate numa information

2022-11-14 Thread Mina Almasry
iously, the target_node was always 0 > > > > > > > since > > > > > > > the ndr_desc.target_node field was never explicitly set. The code > > > > > > > for > > > > > > > computing the numa node is taken from cxl_pmem

Re: [PATCH v1] virtio_pmem: populate numa information

2022-11-11 Thread Mina Almasry
the ndr_desc.target_node field was never explicitly set. The code for > > > > > computing the numa node is taken from cxl_pmem_region_probe in > > > > > drivers/cxl/pmem.c. > > > > > > > > > > Signed-off-by: Michael Sammler Tested-by: Mina

Re: [PATCH] hugetlb_cgroup: fix reservation accounting

2020-10-28 Thread Mina Almasry
rg->to - f); > > + > > + del += rg->to - f; > > + rg->to = f; > > } > > } > > > > @@ -2454,6 +2453,9 @@ struct page *alloc_huge_page(struct vm_area_struct > > *vma, > > > > rsv_adjust = hugepage_subpool_put_pages(spool, 1); > > hugetlb_acct_memory(h, -rsv_adjust); > > + if (deferred_reserve) > > + hugetlb_cgroup_uncharge_page_rsvd(hstate_index(h), > > + pages_per_huge_page(h), page); > > } > > return page; > > > > -- > > 2.25.4 > Sorry for the late review. Looks good to me. Reviewed-by: Mina Almasry

Re: cgroup and FALLOC_FL_PUNCH_HOLE: WARNING: CPU: 13 PID: 2438 at mm/page_counter.c:57 page_counter_uncharge+0x4b/0x5

2020-10-14 Thread Mina Almasry
On Wed, Oct 14, 2020 at 9:15 AM David Hildenbrand wrote: > > On 14.10.20 17:22, David Hildenbrand wrote: > > Hi everybody, > > > > Michal Privoznik played with "free page reporting" in QEMU/virtio-balloon > > with hugetlbfs and reported that this results in [1] > > > > 1. WARNING: CPU: 13 PID: 243

Re: [PATCH 1/2] selftests/vm/write_to_hugetlbfs.c: fix unused variable warning

2020-05-18 Thread Mina Almasry
On Sat, May 16, 2020 at 5:12 PM John Hubbard wrote: > > Remove unused variable "i", which was triggering a compiler warning. > > Fixes: 29750f71a9b4 ("hugetlb_cgroup: add hugetlb_cgroup reservation tests") > Cc: Mina Almasry > Signed-off-by: John Hubbar

Re: [PATCH v6 5/9] hugetlb: disable region_add file_region coalescing

2019-10-21 Thread Mina Almasry
On Mon, Oct 21, 2019 at 12:02 PM Mike Kravetz wrote: > > On 10/12/19 5:30 PM, Mina Almasry wrote: > > A follow up patch in this series adds hugetlb cgroup uncharge info the > > file_region entries in resv->regions. The cgroup uncharge info may > > differ for differ

Re: [PATCH v5 0/7] hugetlb_cgroup: Add hugetlb_cgroup reservation limits

2019-10-14 Thread Mina Almasry
On Mon, Oct 14, 2019 at 10:33 AM Mike Kravetz wrote: > > On 10/11/19 1:41 PM, Mina Almasry wrote: > > On Fri, Oct 11, 2019 at 12:10 PM Mina Almasry > > wrote: > >> > >> On Mon, Sep 23, 2019 at 10:47 AM Mike Kravetz > >> wrote: > >>> >

[PATCH v6 9/9] hugetlb_cgroup: Add hugetlb_cgroup reservation docs

2019-10-12 Thread Mina Almasry
Add docs for how to use hugetlb_cgroup reservations, and their behavior. Signed-off-by: Mina Almasry Acked-by: Hillf Danton --- Changes in v6: - Updated docs to reflect the new design based on a new counter that tracks both reservations and faults. --- .../admin-guide/cgroup-v1/hugetlb.rst

[PATCH v6 8/9] hugetlb_cgroup: Add hugetlb_cgroup reservation tests

2019-10-12 Thread Mina Almasry
-off-by: Mina Almasry --- Changes in v6: - Updates tests for cgroups-v2 and NORESERVE allocations. --- tools/testing/selftests/vm/.gitignore | 1 + tools/testing/selftests/vm/Makefile | 1 + .../selftests/vm/charge_reserved_hugetlb.sh | 527

[PATCH v6 6/9] hugetlb_cgroup: add accounting for shared mappings

2019-10-12 Thread Mina Almasry
unreserved, we also uncharge the file_region->reservation_counter. Signed-off-by: Mina Almasry --- mm/hugetlb.c | 147 --- 1 file changed, 116 insertions(+), 31 deletions(-) diff --git a/mm/hugetlb.c b/mm/hugetlb.c index f9c1947925bb9..af336b

[PATCH v6 7/9] hugetlb_cgroup: support noreserve mappings

2019-10-12 Thread Mina Almasry
Support MAP_NORESERVE accounting as part of the new counter. For each hugepage allocation, at allocation time we check if there is a reservation for this allocation or not. If there is a reservation for this allocation, then this allocation was charged at reservation time, and we don't re-account

[PATCH v6 4/9] hugetlb_cgroup: add reservation accounting for private mappings

2019-10-12 Thread Mina Almasry
ion_counter. On hugetlb_vm_op_close, we uncharge resv_map->reservation_counter. Signed-off-by: Mina Almasry Acked-by: Hillf Danton --- include/linux/hugetlb.h| 8 +++ include/linux/hugetlb_cgroup.h | 11 + mm/hugetlb.c | 44 +++

[PATCH v6 2/9] hugetlb_cgroup: add interface for charge/uncharge hugetlb reservations

2019-10-12 Thread Mina Almasry
, and hugetlb_cgroup_css_offline. Signed-off-by: Mina Almasry --- include/linux/hugetlb_cgroup.h | 67 +- mm/hugetlb.c | 17 +++--- mm/hugetlb_cgroup.c| 100 + 3 files changed, 130 insertions(+), 54 deletions

[PATCH v6 1/9] hugetlb_cgroup: Add hugetlb_cgroup reservation counter

2019-10-12 Thread Mina Almasry
t failed size 2097152 from line 176: Invalid argument - LD_PRELOAD=libhugetlbfs.so HUGETLB_SHM=yes shmoverride_unlinked (2M: 32): FAILshmget failed size 2097152 from line 176: Invalid argument [1]: https://www.kernel.org/doc/html/latest/vm/hugetlbfs_reserv.html Signed-off-by: M

[PATCH v6 3/9] hugetlb_cgroup: add cgroup-v2 support

2019-10-12 Thread Mina Almasry
--- mm/hugetlb_cgroup.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/mm/hugetlb_cgroup.c b/mm/hugetlb_cgroup.c index 854117513979b..ac1500205faf7 100644 --- a/mm/hugetlb_cgroup.c +++ b/mm/hugetlb_cgroup.c @@ -503,8 +503,13 @@ static void __init __hugetlb_cgr

[PATCH v6 5/9] hugetlb: disable region_add file_region coalescing

2019-10-12 Thread Mina Almasry
adds_in_progress by 1 after region_add or region_abort. Instead, region_chg calls add_reservation_in_range() to count the number of regions needed and allocates those, and that info is passed to region_add and region_abort to decrement adds_in_progress correctly. Signed-off-by: Mina Almasry

Re: [PATCH v5 0/7] hugetlb_cgroup: Add hugetlb_cgroup reservation limits

2019-10-11 Thread Mina Almasry
On Fri, Oct 11, 2019 at 12:10 PM Mina Almasry wrote: > > On Mon, Sep 23, 2019 at 10:47 AM Mike Kravetz wrote: > > > > On 9/19/19 3:24 PM, Mina Almasry wrote: > > > Patch series implements hugetlb_cgroup reservation usage and limits, which > > > track huge

Re: [PATCH v5 0/7] hugetlb_cgroup: Add hugetlb_cgroup reservation limits

2019-10-11 Thread Mina Almasry
On Mon, Sep 23, 2019 at 10:47 AM Mike Kravetz wrote: > > On 9/19/19 3:24 PM, Mina Almasry wrote: > > Patch series implements hugetlb_cgroup reservation usage and limits, which > > track hugetlb reservations rather than hugetlb memory faulted in. Details of > > the approac

  1   2   >