On Fri, Dec 02, 2016 at 09:21:08AM +0100, Michal Hocko wrote: > On Fri 02-12-16 15:03:46, Joonsoo Kim wrote: > [...] > > > o pcp accounting during free is now confined to free_pcppages_bulk as it's > > > impossible for the caller to know exactly how many pages were freed. > > > Due to the high-order caches, the number of pages drained for a request > > > is no longer precise. > > > > > > o The high watermark for per-cpu pages is increased to reduce the probability > > > that a single refill causes a drain on the next free. > [...] > > I guess that this patch would cause following problems. > > > > 1. If pcp->batch is too small, high order page will not be freed > > easily and survive longer. Think about following situation. > > > > Batch count: 7 > > MIGRATE_UNMOVABLE -> MIGRATE_MOVABLE -> MIGRATE_RECLAIMABLE -> order 1 > > -> order 2... > > > > free count: 1 + 1 + 1 + 2 + 4 = 9 > > so order 3 would not be freed. > > I guess the second paragraph above in the changelog tries to clarify > that... It doesn't perfectly clarify my concern. This is a different problem. > > > 2. And, It seems that this logic penalties high order pages. One free > > to high order page means 1 << order pages free rather than just > > one page free. This logic do round-robin to choose the target page so > > amount of freed page will be different by the order. > > Yes this is indeed possible. The first paragraph above mentions this > problem. Yes, it is mentioned simply but we cannot easily notice that the above penalty for high order page is there. Thanks. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>