mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vladimir Petrzhikovskii <vladimir@dfb.sh>
To: dtatulea@nvidia.com
Cc: mst@redhat.com, jasowangio@gmail.com, eperezma@redhat.com,
	xuanzhuo@linux.alibaba.com, virtualization@lists.linux.dev,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	nikolai@kalinidze.me
Subject: Re: [PATCH] vdpa/mlx5: Bound the KLM count of the user MR
Date: Fri, 20 Nov 2026 14:20:34 +0100	[thread overview]
Message-ID: <20261120132034.1337770-1-vladimir@dfb.sh> (raw)
In-Reply-To: <d4f67696-5095-4948-9029-f657058431b0@nvidia.com>

Thank you for the comments!

On 19.11.26 19:12, Dragos Tatulea wrote:
> Please make this paragraph more human friendly. Enough to say that
> the type doesn't fit the value or something like that.

> No need to say what the code does. Focus on the why.

Shortened both in v2.

> Yes The limit is right.

Thanks.

> Comment not needed.

Dropped.

> Unrelated change for fix. Drop please.

Dropped. The command then keeps today's limit: kzalloc() caps it at
KMALLOC_MAX_SIZE, 4 MiB with 4K pages, which holds fewer than 2^18
KLMs. On a device with log_max_klm_list_size above 18, a guest map
that needs more KLMs than that fails with -ENOMEM and a one-time
warning from the page allocator. Do devices report more than 18? If
so, I will send kvzalloc() as a separate patch.

> Why not DIV_ROUND_UP_POW2(map->start - pe, MAX_KLM_SIZE)?

I missed that it exists. v2 uses it.

> Use mlx5_vdpa_warn(). Rate limiting here won't help: the other prints
> will trigger.

Done.

Vladimir

      reply	other threads:[~2026-11-20 13:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-09 19:21 Vladimir Petrzhikovskii
2026-11-19 15:15 ` Michael S. Tsirkin
2026-11-19 18:12   ` Dragos Tatulea
2026-11-20 13:20     ` Vladimir Petrzhikovskii [this message]

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=20261120132034.1337770-1-vladimir@dfb.sh \
    --to=vladimir@dfb.sh \
    --cc=dtatulea@nvidia.com \
    --cc=eperezma@redhat.com \
    --cc=jasowangio@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=nikolai@kalinidze.me \
    --cc=stable@vger.kernel.org \
    --cc=virtualization@lists.linux.dev \
    --cc=xuanzhuo@linux.alibaba.com \
    /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

all inboxes | Powered by JetHome®