Re: [PATCH 09/11] mm, compaction: Abstract compaction feedback to helpers

2016-04-12 Thread Michal Hocko
On Tue 12-04-16 13:53:47, Vlastimil Babka wrote: > On 04/11/2016 05:14 PM, Michal Hocko wrote: > >On Mon 11-04-16 16:39:21, Vlastimil Babka wrote: > >>On 04/05/2016 01:25 PM, Michal Hocko wrote: > >[...] > >>>+/* Compaction has failed and it doesn't make much sense to keep retrying. > >>>*/ > >>>+

Re: [PATCH 09/11] mm, compaction: Abstract compaction feedback to helpers

2016-04-12 Thread Vlastimil Babka
On 04/11/2016 05:40 PM, Michal Hocko wrote: Hi Andrew, Vlastimil has pointed out[1] that using compaction_withdrawn() for THP allocations has some non-trivial consequences. While I still think that the check is OK it is true we shouldn't sneak in a potential behavior change into something that ba

Re: [PATCH 09/11] mm, compaction: Abstract compaction feedback to helpers

2016-04-12 Thread Vlastimil Babka
On 04/11/2016 05:14 PM, Michal Hocko wrote: On Mon 11-04-16 16:39:21, Vlastimil Babka wrote: On 04/05/2016 01:25 PM, Michal Hocko wrote: [...] +/* Compaction has failed and it doesn't make much sense to keep retrying. */ +static inline bool compaction_failed(enum compact_result result) +{ +

Re: [PATCH 09/11] mm, compaction: Abstract compaction feedback to helpers

2016-04-11 Thread Michal Hocko
Hi Andrew, Vlastimil has pointed out[1] that using compaction_withdrawn() for THP allocations has some non-trivial consequences. While I still think that the check is OK it is true we shouldn't sneak in a potential behavior change into something that basically provides an API. So can you fold the f

Re: [PATCH 09/11] mm, compaction: Abstract compaction feedback to helpers

2016-04-11 Thread Michal Hocko
On Mon 11-04-16 17:14:10, Michal Hocko wrote: > On Mon 11-04-16 16:39:21, Vlastimil Babka wrote: > > On 04/05/2016 01:25 PM, Michal Hocko wrote: [...] > > >+ /* > > >+ * Checks for THP-specific high-order allocations and back off > > >+ * if the the compaction backed off > > >+ */ > > >+ if

Re: [PATCH 09/11] mm, compaction: Abstract compaction feedback to helpers

2016-04-11 Thread Michal Hocko
On Mon 11-04-16 16:39:21, Vlastimil Babka wrote: > On 04/05/2016 01:25 PM, Michal Hocko wrote: [...] > >+/* Compaction has failed and it doesn't make much sense to keep retrying. */ > >+static inline bool compaction_failed(enum compact_result result) > >+{ > >+/* All zones where scanned complet

Re: [PATCH 09/11] mm, compaction: Abstract compaction feedback to helpers

2016-04-11 Thread Vlastimil Babka
On 04/05/2016 01:25 PM, Michal Hocko wrote: From: Michal Hocko Compaction can provide a wild variation of feedback to the caller. Many of them are implementation specific and the caller of the compaction (especially the page allocator) shouldn't be bound to specifics of the current implementati

Re: [PATCH 09/11] mm, compaction: Abstract compaction feedback to helpers

2016-04-06 Thread Andrew Morton
On Tue, 5 Apr 2016 17:55:39 -0700 (PDT) Hugh Dickins wrote: > > I ended up doing this: > > > > /* Checks for THP-specific high-order allocations */ > > if (!is_thp_allocation(gfp_mask, order)) > > migration_mode = MIGRATE_SYNC_LIGHT; > > > > /* > > * Checks for THP-

Re: [PATCH 09/11] mm, compaction: Abstract compaction feedback to helpers

2016-04-06 Thread Michal Hocko
On Tue 05-04-16 17:55:39, Hugh Dickins wrote: > On Tue, 5 Apr 2016, Andrew Morton wrote: > > On Tue, 5 Apr 2016 13:25:31 +0200 Michal Hocko wrote: > > > - if (is_thp_gfp_mask(gfp_mask)) { > > > - /* > > > - * If compaction is deferred for high-order allocations, it is > > > -

Re: [PATCH 09/11] mm, compaction: Abstract compaction feedback to helpers

2016-04-05 Thread Hugh Dickins
On Tue, 5 Apr 2016, Andrew Morton wrote: > On Tue, 5 Apr 2016 13:25:31 +0200 Michal Hocko wrote: > > - if (is_thp_gfp_mask(gfp_mask)) { > > - /* > > -* If compaction is deferred for high-order allocations, it is > > -* because sync compaction recently failed. I

Re: [PATCH 09/11] mm, compaction: Abstract compaction feedback to helpers

2016-04-05 Thread Andrew Morton
On Tue, 5 Apr 2016 13:25:31 +0200 Michal Hocko wrote: > From: Michal Hocko > > Compaction can provide a wild variation of feedback to the caller. Many > of them are implementation specific and the caller of the compaction > (especially the page allocator) shouldn't be bound to specifics of the

[PATCH 09/11] mm, compaction: Abstract compaction feedback to helpers

2016-04-05 Thread Michal Hocko
From: Michal Hocko Compaction can provide a wild variation of feedback to the caller. Many of them are implementation specific and the caller of the compaction (especially the page allocator) shouldn't be bound to specifics of the current implementation. This patch abstracts the feedback into th