lkml.org 
[lkml]   [2014]   [Jan]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 8/9] numa,sched: rename variables in task_numa_fault
    Date
    From: Rik van Riel <riel@redhat.com>

    We track both the node of the memory after a NUMA fault, and the node
    of the CPU on which the fault happened. Rename the local variables in
    task_numa_fault to make things more explicit.

    Suggested-by: Mel Gorman <mgorman@suse.de>
    Signed-off-by: Rik van Riel <riel@redhat.com>
    ---
    kernel/sched/fair.c | 8 ++++----
    1 file changed, 4 insertions(+), 4 deletions(-)

    diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
    index f713f3a..43ca8c4 100644
    --- a/kernel/sched/fair.c
    +++ b/kernel/sched/fair.c
    @@ -1747,11 +1747,11 @@ void task_numa_free(struct task_struct *p)
    /*
    * Got a PROT_NONE fault for a page on @node.
    */
    -void task_numa_fault(int last_cpupid, int node, int pages, int flags)
    +void task_numa_fault(int last_cpupid, int mem_node, int pages, int flags)
    {
    struct task_struct *p = current;
    bool migrated = flags & TNF_MIGRATED;
    - int this_node = task_node(current);
    + int cpu_node = task_node(current);
    int priv;

    if (!numabalancing_enabled)
    @@ -1806,8 +1806,8 @@ void task_numa_fault(int last_cpupid, int node, int pages, int flags)
    if (migrated)
    p->numa_pages_migrated += pages;

    - p->numa_faults_buffer_memory[task_faults_idx(node, priv)] += pages;
    - p->numa_faults_buffer_cpu[task_faults_idx(this_node, priv)] += pages;
    + p->numa_faults_buffer_memory[task_faults_idx(mem_node, priv)] += pages;
    + p->numa_faults_buffer_cpu[task_faults_idx(cpu_node, priv)] += pages;
    p->numa_faults_locality[!!(flags & TNF_FAULT_LOCAL)] += pages;
    }

    --
    1.8.4.2


    \
     
     \ /
      Last update: 2014-01-22 00:41    [W:2.254 / U:3.652 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site