public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Israel Rukshin <israelr@nvidia.com>
Cc: Linux-nvme <linux-nvme@lists.infradead.org>,
	Sagi Grimberg <sagi@grimberg.me>, Christoph Hellwig <hch@lst.de>,
	Keith Busch <kbusch@kernel.org>, Jens Axboe <axboe@fb.com>,
	Nitzan Carmi <nitzanc@nvidia.com>,
	Max Gurtovoy <mgurtovoy@nvidia.com>
Subject: Re: [PATCH 2/2] nvmet-tcp: Use kvcalloc for commands array
Date: Mon, 24 Nov 2025 15:25:25 +0100	[thread overview]
Message-ID: <20251124142525.GA16757@lst.de> (raw)
In-Reply-To: <1763966961-32140-2-git-send-email-israelr@nvidia.com>

On Mon, Nov 24, 2025 at 08:49:21AM +0200, Israel Rukshin wrote:
> Replace kcalloc with kvcalloc for allocation of the commands
> array. Each command structure is 712 bytes. The array typically
> exceeds a single page, and grows much larger with high queue depths
> (e.g., commands >182KB).
> 
> kvcalloc automatically falls back to vmalloc for large or fragmented
> allocations, improving reliability. In our case, this memory is not
> aimed for DMA operations and could be safely allocated by kvcalloc.
> Using virtually contiguous memory helps to avoid allocation failures
> and out-of-memory conditions common with kcalloc on large pools.

Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>



  reply	other threads:[~2025-11-24 14:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-24  6:49 [PATCH 1/2] nvmet-rdma: Use kvcalloc for commands and responses arrays Israel Rukshin
2025-11-24  6:49 ` [PATCH 2/2] nvmet-tcp: Use kvcalloc for commands array Israel Rukshin
2025-11-24 14:25   ` Christoph Hellwig [this message]
2025-11-30 22:52   ` Sagi Grimberg
2025-11-24 14:24 ` [PATCH 1/2] nvmet-rdma: Use kvcalloc for commands and responses arrays Christoph Hellwig
2025-11-24 19:35 ` Keith Busch
2025-11-30 22:52 ` Sagi Grimberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251124142525.GA16757@lst.de \
    --to=hch@lst.de \
    --cc=axboe@fb.com \
    --cc=israelr@nvidia.com \
    --cc=kbusch@kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=mgurtovoy@nvidia.com \
    --cc=nitzanc@nvidia.com \
    --cc=sagi@grimberg.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox