lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 17 Jul 2013 10:17:29 +0800
From:	Hillf Danton <dhillf@...il.com>
To:	Mel Gorman <mgorman@...e.de>
Cc:	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Srikar Dronamraju <srikar@...ux.vnet.ibm.com>,
	Ingo Molnar <mingo@...nel.org>,
	Andrea Arcangeli <aarcange@...hat.com>,
	Johannes Weiner <hannes@...xchg.org>,
	Linux-MM <linux-mm@...ck.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 09/18] sched: Add infrastructure for split shared/private
 accounting of NUMA hinting faults

On Mon, Jul 15, 2013 at 11:20 PM, Mel Gorman <mgorman@...e.de> wrote:
>  /*
>   * Got a PROT_NONE fault for a page on @node.
>   */
> -void task_numa_fault(int node, int pages, bool migrated)
> +void task_numa_fault(int last_nid, int node, int pages, bool migrated)

For what is the new parameter?

>  {
>         struct task_struct *p = current;
> +       int priv;
>
>         if (!sched_feat_numa(NUMA))
>                 return;
>
> +       /* For now, do not attempt to detect private/shared accesses */
> +       priv = 1;
> +
>         /* Allocate buffer to track faults on a per-node basis */
>         if (unlikely(!p->numa_faults)) {
> -               int size = sizeof(*p->numa_faults) * nr_node_ids;
> +               int size = sizeof(*p->numa_faults) * 2 * nr_node_ids;
>
>                 /* numa_faults and numa_faults_buffer share the allocation */
>                 p->numa_faults = kzalloc(size * 2, GFP_KERNEL);
> @@ -900,7 +915,7 @@ void task_numa_fault(int node, int pages, bool migrated)
>                         return;
>
>                 BUG_ON(p->numa_faults_buffer);
> -               p->numa_faults_buffer = p->numa_faults + nr_node_ids;
> +               p->numa_faults_buffer = p->numa_faults + (2 * nr_node_ids);
>         }
>
>         /*
> @@ -914,7 +929,7 @@ void task_numa_fault(int node, int pages, bool migrated)
>         task_numa_placement(p);
>
>         /* Record the fault, double the weight if pages were migrated */
> -       p->numa_faults_buffer[node] += pages << migrated;
> +       p->numa_faults_buffer[task_faults_idx(node, priv)] += pages << migrated;
>  }
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ