On 10 Sep 2020, at 9:32, Rik van Riel wrote: > On Thu, 2020-09-10 at 09:32 +0200, Michal Hocko wrote: >> [Cc Vlastimil and Mel - the whole email thread starts >> http://lkml.kernel.org/r/20200902180628.4052244-1-zi.yan@xxxxxxxx >> but this particular subthread has diverged a bit and you might find >> it >> interesting] >> >> On Wed 09-09-20 15:43:55, David Hildenbrand wrote: >>> >>> I am not sure I like the trend towards CMA that we are seeing, >>> reserving >>> huge buffers for specific users (and eventually even doing it >>> automatically). >>> >>> What we actually want is ZONE_MOVABLE with relaxed guarantees, such >>> that >>> anybody who requires large, unmovable allocations can use it. >>> >>> I once played with the idea of having ZONE_PREFER_MOVABLE, which >>> a) Is the primary choice for movable allocations >>> b) Is allowed to contain unmovable allocations (esp., gigantic >>> pages) >>> c) Is the fallback for ZONE_NORMAL for unmovable allocations, >>> instead of >>> running out of memory >> >> I might be missing something but how can this work longterm? Or put >> in >> another words why would this work any better than existing >> fragmentation >> avoidance techniques that page allocator implements already - > > One big difference is reclaim. If ZONE_NORMAL runs low on > free memory, page reclaim would kick in and evict some > movable/reclaimable things, to free up more space for > unmovable allocations. > > The current fragmentation avoidance techniques don't do > things like reclaim, or proactively migrating movable > pages out of unmovable page blocks to prevent unmovable > allocations in currently movable page blocks. Isn’t Mel Gorman’s watermark boost patch[1] (merged about a year ago) doing what you are describing? [1]https://lore.kernel.org/linux-mm/20181123114528.28802-1-mgorman@xxxxxxxxxxxxxxxxxxx/ — Best Regards, Yan Zi
Attachment:
signature.asc
Description: OpenPGP digital signature