On 04/05/2016 01:25 PM, Michal Hocko wrote:
From: Michal Hocko <[email protected]>

__alloc_pages_direct_compact communicates potential back off by two
variables:
        - deferred_compaction tells that the compaction returned
          COMPACT_DEFERRED
        - contended_compaction is set when there is a contention on
          zone->lock resp. zone->lru_lock locks

__alloc_pages_slowpath then backs of for THP allocation requests to
prevent from long stalls. This is rather messy and it would be much
cleaner to return a single compact result value and hide all the nasty
details into __alloc_pages_direct_compact.

On the other hand, the nasty subtle details of THP allocation handling are now split between __alloc_pages_direct_compact and __alloc_pages_slowpath(). Lesser evil, I guess. I wish we could get rid of these special cases, now that latency of THP direct allocations is reduced by Mel's new defaults.

This patch shouldn't introduce any functional changes.

Signed-off-by: Michal Hocko <[email protected]>

Acked-by: Vlastimil Babka <[email protected]>

Reply via email to