Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@ziepe.ca>
To: "Vlastimil Babka (SUSE)" <vbabka@kernel.org>
Cc: Mike Rapoport <rppt@kernel.org>,
	Leon Romanovsky <leon@kernel.org>,
	Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	linux-rdma@vger.kernel.org, Matthew Wilcox <willy@infradead.org>,
	Michal Hocko <mhocko@kernel.org>,
	"David Hildenbrand (Red Hat)" <david@kernel.org>,
	Dave Chinner <dgc@kernel.org>
Subject: Re: [PATCH 1/5] RDMA/umem: ib_umem_get(): use kmalloc() to allocate page array
Date: Thu, 2 Jul 2026 09:55:16 -0300	[thread overview]
Message-ID: <20260702125516.GO7525@ziepe.ca> (raw)
In-Reply-To: <9cc11eeb-372a-49fb-ba89-486333ac71c4@kernel.org>

On Thu, Jul 02, 2026 at 02:46:46PM +0200, Vlastimil Babka (SUSE) wrote:
> I think this should be discussed more broadly and not block this
> change.

Currently all of these get_free_pages ones in this series are this
special need, so I'd like to not loose that marking somehow. Maybe a
comment or maybe a inline wrapper function.

> Instead of adding just kmalloc_temporary() we should look at the bigger
> picture where we have manual optimistic nowait attempts with smaller
> fallbacks. Willy's LSF/MM plenary touched on this, as well as recent threads
> with Dave Chinner [1] etc.

Yeah, there is a bigger thing here.

> With that said, I'm for example not sure if "_temporary()" is really the
> distinguishing characteristic for this to be part of the name.

It is the main characteristic of the specific workflow I am pointing at:

 - Allocation is a short term temporary buffer to run some algorithm
 - Performance trade off is larger memory = faster algorithm
 - Sleeping, reclaim, etc is going to be slower than just using a
   PAGE_SIZE buffer
 - Must be contiguous

IMHO I don't mind labeling these specific things with a specific
function, even if there is a more general function also.

> [1] https://lore.kernel.org/all/1f50ce04-20e6-46a0-9d8a-00a5f7a74967@suse.com/

Like this is a different workflow than the temporary one, you may want
to do a little more work to try to get larger pages since they will be
in use for a long time.

Jason

  reply	other threads:[~2026-07-02 12:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-30 10:52 [PATCH 0/5] RDMA, IB: replace __get_free_pages() with kmalloc() Mike Rapoport (Microsoft)
2026-06-30 10:52 ` [PATCH 1/5] RDMA/umem: ib_umem_get(): use kmalloc() to allocate page array Mike Rapoport (Microsoft)
2026-06-30 12:31   ` Jason Gunthorpe
2026-06-30 15:00     ` Mike Rapoport
2026-06-30 15:01       ` Mike Rapoport
2026-06-30 15:36         ` Jason Gunthorpe
2026-07-02 12:46           ` Vlastimil Babka (SUSE)
2026-07-02 12:55             ` Jason Gunthorpe [this message]
2026-07-02 19:36               ` Mike Rapoport
2026-06-30 10:52 ` [PATCH 2/5] RDMA/mlx5: replace __get_free_page() with kmalloc() Mike Rapoport (Microsoft)
2026-06-30 10:52 ` [PATCH 3/5] IB/mthca: mthca_reg_user_mr(): use kmalloc() to allocate addresses array Mike Rapoport (Microsoft)
2026-06-30 10:52 ` [PATCH 4/5] IB/mthca: allocate mthca_array memory with kzalloc() Mike Rapoport (Microsoft)
2026-06-30 10:52 ` [PATCH 5/5] IB/rdmavt: use kzalloc() to allocate QPN-map pages Mike Rapoport (Microsoft)

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=20260702125516.GO7525@ziepe.ca \
    --to=jgg@ziepe.ca \
    --cc=david@kernel.org \
    --cc=dennis.dalessandro@cornelisnetworks.com \
    --cc=dgc@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mhocko@kernel.org \
    --cc=rppt@kernel.org \
    --cc=vbabka@kernel.org \
    --cc=willy@infradead.org \
    /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