* [PATCH] RDMA/irdma: Use kvzalloc for paged memory DMA address array
@ 2026-01-21 18:54 Carlos Bilbao
2026-01-21 19:00 ` Carlos Bilbao
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Carlos Bilbao @ 2026-01-21 18:54 UTC (permalink / raw)
To: mustafa.ismail, shiraz.saleem, jgg, leon
Cc: bilbao, linux-rdma, linux-kernel, carlos.bilbao
Allocate array chunk->dmainfo.dmaaddrs using kvzalloc() to allow the
allocation to fall back to vmalloc when contiguous memory is unavailable
(instead of failing and logging page allocation warnings).
Signed-off-by: Carlos Bilbao (Lambda) <carlos.bilbao@kernel.org>
---
drivers/infiniband/hw/irdma/utils.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/infiniband/hw/irdma/utils.c
b/drivers/infiniband/hw/irdma/utils.c
index 0422787592d8..59ef9856fd25 100644
--- a/drivers/infiniband/hw/irdma/utils.c
+++ b/drivers/infiniband/hw/irdma/utils.c
@@ -2257,7 +2257,7 @@ void irdma_pble_free_paged_mem(struct irdma_chunk
*chunk)
chunk->pg_cnt);
done:
- kfree(chunk->dmainfo.dmaaddrs);
+ kvfree(chunk->dmainfo.dmaaddrs);
chunk->dmainfo.dmaaddrs = NULL;
vfree(chunk->vaddr);
chunk->vaddr = NULL;
@@ -2274,7 +2274,7 @@ int irdma_pble_get_paged_mem(struct irdma_chunk
*chunk, u32 pg_cnt)
u32 size;
void *va;
- chunk->dmainfo.dmaaddrs = kzalloc(pg_cnt << 3, GFP_KERNEL);
+ chunk->dmainfo.dmaaddrs = kvzalloc(pg_cnt << 3, GFP_KERNEL);
if (!chunk->dmainfo.dmaaddrs)
return -ENOMEM;
@@ -2295,7 +2295,7 @@ int irdma_pble_get_paged_mem(struct irdma_chunk
*chunk, u32 pg_cnt)
return 0;
err:
- kfree(chunk->dmainfo.dmaaddrs);
+ kvfree(chunk->dmainfo.dmaaddrs);
chunk->dmainfo.dmaaddrs = NULL;
return -ENOMEM;
-- 2.50.1 (Apple Git-155)
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] RDMA/irdma: Use kvzalloc for paged memory DMA address array
2026-01-21 18:54 [PATCH] RDMA/irdma: Use kvzalloc for paged memory DMA address array Carlos Bilbao
@ 2026-01-21 19:00 ` Carlos Bilbao
2026-01-22 20:53 ` Nikolova, Tatyana E
2026-01-26 19:46 ` Leon Romanovsky
2 siblings, 0 replies; 6+ messages in thread
From: Carlos Bilbao @ 2026-01-21 19:00 UTC (permalink / raw)
To: jgg, leon, akpm; +Cc: bilbao, linux-rdma, linux-kernel, carlos.bilbao
Looks like Mustafa is no longer at Intel [1]. Does anyone know how
to reach them, or Shiraz? Their email addresses appear to be
bouncing as well.
Maybe you do, Andrew?
[1] https://www.phoronix.com/news/Intel-More-Orphans-Maintainers
On 1/21/26 10:54 AM, Carlos Bilbao wrote:
> Allocate array chunk->dmainfo.dmaaddrs using kvzalloc() to allow the
> allocation to fall back to vmalloc when contiguous memory is unavailable
> (instead of failing and logging page allocation warnings).
>
> Signed-off-by: Carlos Bilbao (Lambda) <carlos.bilbao@kernel.org>
> ---
> drivers/infiniband/hw/irdma/utils.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/infiniband/hw/irdma/utils.c
> b/drivers/infiniband/hw/irdma/utils.c
> index 0422787592d8..59ef9856fd25 100644
> --- a/drivers/infiniband/hw/irdma/utils.c
> +++ b/drivers/infiniband/hw/irdma/utils.c
> @@ -2257,7 +2257,7 @@ void irdma_pble_free_paged_mem(struct irdma_chunk
> *chunk)
> chunk->pg_cnt);
>
> done:
> - kfree(chunk->dmainfo.dmaaddrs);
> + kvfree(chunk->dmainfo.dmaaddrs);
> chunk->dmainfo.dmaaddrs = NULL;
> vfree(chunk->vaddr);
> chunk->vaddr = NULL;
> @@ -2274,7 +2274,7 @@ int irdma_pble_get_paged_mem(struct irdma_chunk
> *chunk, u32 pg_cnt)
> u32 size;
> void *va;
>
> - chunk->dmainfo.dmaaddrs = kzalloc(pg_cnt << 3, GFP_KERNEL);
> + chunk->dmainfo.dmaaddrs = kvzalloc(pg_cnt << 3, GFP_KERNEL);
> if (!chunk->dmainfo.dmaaddrs)
> return -ENOMEM;
>
> @@ -2295,7 +2295,7 @@ int irdma_pble_get_paged_mem(struct irdma_chunk
> *chunk, u32 pg_cnt)
>
> return 0;
> err:
> - kfree(chunk->dmainfo.dmaaddrs);
> + kvfree(chunk->dmainfo.dmaaddrs);
> chunk->dmainfo.dmaaddrs = NULL;
>
> return -ENOMEM;
> -- 2.50.1 (Apple Git-155)
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [PATCH] RDMA/irdma: Use kvzalloc for paged memory DMA address array
2026-01-21 18:54 [PATCH] RDMA/irdma: Use kvzalloc for paged memory DMA address array Carlos Bilbao
2026-01-21 19:00 ` Carlos Bilbao
@ 2026-01-22 20:53 ` Nikolova, Tatyana E
2026-01-26 19:46 ` Leon Romanovsky
2 siblings, 0 replies; 6+ messages in thread
From: Nikolova, Tatyana E @ 2026-01-22 20:53 UTC (permalink / raw)
To: Carlos Bilbao, mustafa.ismail@intel.com, shiraz.saleem@intel.com,
jgg@ziepe.ca, leon@kernel.org
Cc: bilbao@vt.edu, linux-rdma@vger.kernel.org,
linux-kernel@vger.kernel.org, carlos.bilbao@kernel.org
> -----Original Message-----
> From: Carlos Bilbao <carlos.bilbao@lambdal.com>
> Sent: Wednesday, January 21, 2026 12:55 PM
> To: mustafa.ismail@intel.com; shiraz.saleem@intel.com; jgg@ziepe.ca;
> leon@kernel.org
> Cc: bilbao@vt.edu; linux-rdma@vger.kernel.org; linux-kernel@vger.kernel.org;
> carlos.bilbao@kernel.org
> Subject: [PATCH] RDMA/irdma: Use kvzalloc for paged memory DMA address
> array
>
> Allocate array chunk->dmainfo.dmaaddrs using kvzalloc() to allow the
> allocation to fall back to vmalloc when contiguous memory is unavailable
> (instead of failing and logging page allocation warnings).
>
> Signed-off-by: Carlos Bilbao (Lambda) <carlos.bilbao@kernel.org>
Acked-by: Tatyana Nikolova <tatyana.e.nikolova@intel.com>
> ---
> drivers/infiniband/hw/irdma/utils.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/infiniband/hw/irdma/utils.c
> b/drivers/infiniband/hw/irdma/utils.c
> index 0422787592d8..59ef9856fd25 100644
> --- a/drivers/infiniband/hw/irdma/utils.c
> +++ b/drivers/infiniband/hw/irdma/utils.c
> @@ -2257,7 +2257,7 @@ void irdma_pble_free_paged_mem(struct
> irdma_chunk
> *chunk)
> chunk->pg_cnt);
>
> done:
> - kfree(chunk->dmainfo.dmaaddrs);
> + kvfree(chunk->dmainfo.dmaaddrs);
> chunk->dmainfo.dmaaddrs = NULL;
> vfree(chunk->vaddr);
> chunk->vaddr = NULL;
> @@ -2274,7 +2274,7 @@ int irdma_pble_get_paged_mem(struct
> irdma_chunk
> *chunk, u32 pg_cnt)
> u32 size;
> void *va;
>
> - chunk->dmainfo.dmaaddrs = kzalloc(pg_cnt << 3, GFP_KERNEL);
> + chunk->dmainfo.dmaaddrs = kvzalloc(pg_cnt << 3, GFP_KERNEL);
> if (!chunk->dmainfo.dmaaddrs)
> return -ENOMEM;
>
> @@ -2295,7 +2295,7 @@ int irdma_pble_get_paged_mem(struct
> irdma_chunk
> *chunk, u32 pg_cnt)
>
> return 0;
> err:
> - kfree(chunk->dmainfo.dmaaddrs);
> + kvfree(chunk->dmainfo.dmaaddrs);
> chunk->dmainfo.dmaaddrs = NULL;
>
> return -ENOMEM;
> -- 2.50.1 (Apple Git-155)
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] RDMA/irdma: Use kvzalloc for paged memory DMA address array
2026-01-21 18:54 [PATCH] RDMA/irdma: Use kvzalloc for paged memory DMA address array Carlos Bilbao
2026-01-21 19:00 ` Carlos Bilbao
2026-01-22 20:53 ` Nikolova, Tatyana E
@ 2026-01-26 19:46 ` Leon Romanovsky
2026-01-28 1:44 ` [PATCH v2] " carlos.bilbao
2 siblings, 1 reply; 6+ messages in thread
From: Leon Romanovsky @ 2026-01-26 19:46 UTC (permalink / raw)
To: Carlos Bilbao
Cc: mustafa.ismail, shiraz.saleem, jgg, bilbao, linux-rdma,
linux-kernel, carlos.bilbao
On Wed, Jan 21, 2026 at 10:54:36AM -0800, Carlos Bilbao wrote:
> Allocate array chunk->dmainfo.dmaaddrs using kvzalloc() to allow the
> allocation to fall back to vmalloc when contiguous memory is unavailable
> (instead of failing and logging page allocation warnings).
>
> Signed-off-by: Carlos Bilbao (Lambda) <carlos.bilbao@kernel.org>
> ---
> drivers/infiniband/hw/irdma/utils.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
This patch doesn't apply to rdma/for-next.
Thanks
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2] RDMA/irdma: Use kvzalloc for paged memory DMA address array
2026-01-26 19:46 ` Leon Romanovsky
@ 2026-01-28 1:44 ` carlos.bilbao
2026-01-28 12:18 ` Leon Romanovsky
0 siblings, 1 reply; 6+ messages in thread
From: carlos.bilbao @ 2026-01-28 1:44 UTC (permalink / raw)
To: Leon Romanovsky
Cc: Carlos Bilbao, linux-rdma, linux-kernel, Carlos Bilbao,
Tatyana Nikolova
From: Carlos Bilbao <carlos.bilbao@kernel.org>
Allocate array chunk->dmainfo.dmaaddrs using kvzalloc() to allow the
allocation to fall back to vmalloc when contiguous memory is unavailable
(instead of failing and logging page allocation warnings).
Acked-by: Tatyana Nikolova <tatyana.e.nikolova@intel.com>
Signed-off-by: Carlos Bilbao (Lambda) <carlos.bilbao@kernel.org>
---
drivers/infiniband/hw/irdma/utils.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/infiniband/hw/irdma/utils.c b/drivers/infiniband/hw/irdma/utils.c
index 13d7499131d4..6aac6d314564 100644
--- a/drivers/infiniband/hw/irdma/utils.c
+++ b/drivers/infiniband/hw/irdma/utils.c
@@ -2239,7 +2239,7 @@ void irdma_pble_free_paged_mem(struct irdma_chunk *chunk)
chunk->pg_cnt);
done:
- kfree(chunk->dmainfo.dmaaddrs);
+ kvfree(chunk->dmainfo.dmaaddrs);
chunk->dmainfo.dmaaddrs = NULL;
vfree(chunk->vaddr);
chunk->vaddr = NULL;
@@ -2256,7 +2256,7 @@ int irdma_pble_get_paged_mem(struct irdma_chunk *chunk, u32 pg_cnt)
u32 size;
void *va;
- chunk->dmainfo.dmaaddrs = kzalloc(pg_cnt << 3, GFP_KERNEL);
+ chunk->dmainfo.dmaaddrs = kvzalloc(pg_cnt << 3, GFP_KERNEL);
if (!chunk->dmainfo.dmaaddrs)
return -ENOMEM;
@@ -2277,7 +2277,7 @@ int irdma_pble_get_paged_mem(struct irdma_chunk *chunk, u32 pg_cnt)
return 0;
err:
- kfree(chunk->dmainfo.dmaaddrs);
+ kvfree(chunk->dmainfo.dmaaddrs);
chunk->dmainfo.dmaaddrs = NULL;
return -ENOMEM;
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2] RDMA/irdma: Use kvzalloc for paged memory DMA address array
2026-01-28 1:44 ` [PATCH v2] " carlos.bilbao
@ 2026-01-28 12:18 ` Leon Romanovsky
0 siblings, 0 replies; 6+ messages in thread
From: Leon Romanovsky @ 2026-01-28 12:18 UTC (permalink / raw)
To: carlos.bilbao; +Cc: Carlos Bilbao, linux-rdma, linux-kernel, Tatyana Nikolova
On Tue, 27 Jan 2026 17:44:46 -0800, carlos.bilbao@kernel.org wrote:
> Allocate array chunk->dmainfo.dmaaddrs using kvzalloc() to allow the
> allocation to fall back to vmalloc when contiguous memory is unavailable
> (instead of failing and logging page allocation warnings).
>
>
Applied, thanks!
[1/1] RDMA/irdma: Use kvzalloc for paged memory DMA address array
https://git.kernel.org/rdma/rdma/c/959d2c356e32ab
Best regards,
--
Leon Romanovsky <leon@kernel.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-01-28 12:18 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-21 18:54 [PATCH] RDMA/irdma: Use kvzalloc for paged memory DMA address array Carlos Bilbao
2026-01-21 19:00 ` Carlos Bilbao
2026-01-22 20:53 ` Nikolova, Tatyana E
2026-01-26 19:46 ` Leon Romanovsky
2026-01-28 1:44 ` [PATCH v2] " carlos.bilbao
2026-01-28 12:18 ` Leon Romanovsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox