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
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
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
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
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
/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
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
> >
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 :-)
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
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.
> >
>
: 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
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
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
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
: 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
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
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
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
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
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
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
>
>
: 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
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
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
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
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
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
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
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
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
---
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
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
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
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
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(+),
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
, 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
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).
--
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
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
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
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
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
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
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
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
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:
> >>>
>
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
-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
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
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
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 +++
, 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
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
---
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
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
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
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 - 100 of 158 matches
Mail list logo