Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1233035 > unrolled thread
| Started by | Johannes Weiner <hannes@cmpxchg.org> |
|---|---|
| First post | 2015-09-25 21:40 +0200 |
| Last post | 2015-09-25 21:40 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH 10/10] mm, page_alloc: Only enforce watermarks for order-0 allocations Johannes Weiner <hannes@cmpxchg.org> - 2015-09-25 21:40 +0200
| From | Johannes Weiner <hannes@cmpxchg.org> |
|---|---|
| Date | 2015-09-25 21:40 +0200 |
| Subject | Re: [PATCH 10/10] mm, page_alloc: Only enforce watermarks for order-0 allocations |
| Message-ID | <qcH0B-2u4-1@gated-at.bofh.it> |
On Mon, Sep 21, 2015 at 01:03:17PM +0100, Mel Gorman wrote: > The primary purpose of watermarks is to ensure that reclaim can always > make forward progress in PF_MEMALLOC context (kswapd and direct reclaim). > These assume that order-0 allocations are all that is necessary for > forward progress. > > High-order watermarks serve a different purpose. Kswapd > had no high-order awareness before they were introduced > (https://lkml.kernel.org/r/413AA7B2.4000907@yahoo.com.au). This was > particularly important when there were high-order atomic requests. > The watermarks both gave kswapd awareness and made a reserve for those > atomic requests. > > There are two important side-effects of this. The most important is that > a non-atomic high-order request can fail even though free pages are available > and the order-0 watermarks are ok. The second is that high-order watermark > checks are expensive as the free list counts up to the requested order must > be examined. > > With the introduction of MIGRATE_HIGHATOMIC it is no longer necessary to > have high-order watermarks. Kswapd and compaction still need high-order > awareness which is handled by checking that at least one suitable high-order > page is free. > > With the patch applied, there was little difference in the allocation > failure rates as the atomic reserves are small relative to the number of > allocation attempts. The expected impact is that there will never be an > allocation failure report that shows suitable pages on the free lists. > > The one potential side-effect of this is that in a vanilla kernel, the > watermark checks may have kept a free page for an atomic allocation. Now, > we are 100% relying on the HighAtomic reserves and an early allocation to > have allocated them. If the first high-order atomic allocation is after > the system is already heavily fragmented then it'll fail. > > Signed-off-by: Mel Gorman <mgorman@techsingularity.net> > Acked-by: Michal Hocko <mhocko@suse.com> Nice. This really is a great improvement over the way we used to ensure higher-order page availability. Acked-by: Johannes Weiner <hannes@cmpxchg.org> -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to top | Article view | linux.kernel
csiph-web