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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAL4WiirrQ+2PqojQ9dnGRF16cxx-1QNRWqcMkVqqZSZwvWC58Q@mail.gmail.com>
Date:	Tue, 31 Jan 2012 02:25:14 +0100
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Wei Liu <wei.liu2@...rix.com>
Cc:	netdev@...r.kernel.org, xen-devel@...ts.xensource.com,
	ian.campbell@...rix.com, konrad.wilk@...cle.com
Subject: Re: [RFC PATCH V3 10/16] netback: rework of per-cpu scratch space.

Le 30 janvier 2012 15:45, Wei Liu <wei.liu2@...rix.com> a écrit :
> If we allocate large arrays in per-cpu section, multi-page ring
> feature is likely to blow up the per-cpu section. So avoid allocating
> large arrays, instead we only store pointers to scratch spaces in
> per-cpu section.
>
> CPU hotplug event is also taken care of.
>

>  }
>
> +static int __create_percpu_scratch_space(unsigned int cpu)
> +{
> +       per_cpu(tx_copy_ops, cpu) =
> +               vzalloc(sizeof(struct gnttab_copy) * MAX_PENDING_REQS);
> +
> +       per_cpu(grant_copy_op, cpu) =
> +               vzalloc(sizeof(struct gnttab_copy)
> +                       * 2 * XEN_NETIF_RX_RING_SIZE);
> +
> +       per_cpu(meta, cpu) = vzalloc(sizeof(struct xenvif_rx_meta)
> +                                    * 2 * XEN_NETIF_RX_RING_SIZE);
> +
> +       if (!per_cpu(tx_copy_ops, cpu) ||
> +           !per_cpu(grant_copy_op, cpu) ||
> +           !per_cpu(meta, cpu))
> +               return -ENOMEM;
> +
> +       return 0;
> +}
> +

Problem is you lost NUMA awareness here.

Please check vzalloc_node()
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ