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....@sent.com > 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. > My suspicion is that a separate zone would work in a similar fashion. > As > long as there is a lot of free memory then zone will be effectively > MOVABLE. Similar applies to normal zone when unmovable allocations > are > in minority. As long as the Normal zone gets full of unmovable > objects > they start overflowing to ZONE_PREFER_MOVABLE and it will resemble > page > block stealing when unmovable objects start spreading over movable > page > blocks. You are right, with the difference being reclaim and/or migration, which could make a real difference in limiting the number of pageblocks that have unmovable allocations. -- All Rights Reversed.
signature.asc
Description: This is a digitally signed message part