Re: [PATCH v5 4/5] kdump: wait for DMA to finish when using CMA

Jiri Bohac
2025-06-19T12:46:57Z

On Fri, Jun 13, 2025 at 11:19:11AM +0200, David Hildenbrand wrote:
> > It's sad to add a 10s delay for something which some systems will never
> > do. I wonder if there's some simple hack we can add. Like having a
> > global flag which gets set the first time someone pins a CMA page
>
> We would likely have to do that for any GUP on such a page (FOLL_GET |
> FOLL_PIN), both from gup-fast and gup-slow.
>
> Should work, but IMHO can be optimized later, on top of this series.

The 10 s was David's suggestion during the discussion of v2 of
this patchset. We already had a discussion about both the length
of the delay and whether to make it configurable [1]

We agreed it was best to start with a longer fixed delay to be on the
safe side.

If the CMA reservation becomes popular and anybody complains
about the delay, then we can trivially make this configurable or
think of other improvements.

[1] https://lore.kernel.org/lkml/a1a5af90-bc8a-448a-81fa-485624d592f3@redhat.com/

--
Jiri Bohac <jbohac@suse.cz>
SUSE Labs, Prague, Czechia