lkml.org 
[lkml]   [2015]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC 4/6] mm, thp: move collapsing from khugepaged to task_work context
On Mon, Feb 23, 2015 at 01:58:40PM +0100, Vlastimil Babka wrote:
> @@ -7713,8 +7820,15 @@ static void task_tick_fair(struct rq *rq, struct task_struct *curr, int queued)
> entity_tick(cfs_rq, se, queued);
> }
>
> - if (numabalancing_enabled)
> - task_tick_numa(rq, curr);
> + /*
> + * For latency considerations, don't schedule the THP work together
> + * with NUMA work. NUMA has higher priority, assuming remote accesses
> + * have worse penalty than TLB misses.
> + */
> + if (!(numabalancing_enabled && task_tick_numa(rq, curr))
> + && khugepaged_enabled())
> + task_tick_thp(rq, curr);
> +
>
> update_rq_runnable_avg(rq, 1);
> }

That's a bit yucky; and I think there's no problem moving that
update_rq_runnable_avg() thing up a bit; which would get you:

static void task_tick_fair(..)
{

...

update_rq_runnable_avg();

if (numabalancing_enabled && task_tick_numa(rq, curr))
return;

if (khugepaged_enabled() && task_tick_thp(rq, curr))
return;
}

Clearly the return on that second conditional is a tad pointless, but
OCD :-)


\
 
 \ /
  Last update: 2015-02-23 15:41    [W:0.126 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site