All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Lebrun <david.lebrun@uclouvain.be>
To: Eric Dumazet <eric.dumazet@gmail.com>,
	David Miller <davem@davemloft.net>
Cc: netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next] ipv6: add NUMA awareness to seg6_hmac_init_algo()
Date: Sat, 21 Jan 2017 13:18:55 +0100	[thread overview]
Message-ID: <588351AF.6060203@uclouvain.be> (raw)
In-Reply-To: <1484928536.16328.127.camel@edumazet-glaptop3.roam.corp.google.com>

[-- Attachment #1: Type: text/plain, Size: 945 bytes --]

On 01/20/2017 05:08 PM, Eric Dumazet wrote:
> From: Eric Dumazet <edumazet@google.com>
> 
> Since we allocate per cpu storage, let's also use NUMA hints.
> 
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> ---
>  net/ipv6/seg6_hmac.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/net/ipv6/seg6_hmac.c b/net/ipv6/seg6_hmac.c
> index 5215e1eba01030dc9345b847eee5ac5ef3bed1b9..b274f1d95e037c93e8e0e6531cfc51709f71297c 100644
> --- a/net/ipv6/seg6_hmac.c
> +++ b/net/ipv6/seg6_hmac.c
> @@ -389,7 +389,8 @@ static int seg6_hmac_init_algo(void)
>  			return -ENOMEM;
>  
>  		for_each_possible_cpu(cpu) {
> -			shash = kzalloc(shsize, GFP_KERNEL);
> +			shash = kzalloc_node(shsize, GFP_KERNEL,
> +					     cpu_to_node(cpu));
>  			if (!shash)
>  				return -ENOMEM;
>  			*per_cpu_ptr(algo->shashs, cpu) = shash;
> 
> 

Thanks

Acked-by: David Lebrun <david.lebrun@uclouvain.be>


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 163 bytes --]

  reply	other threads:[~2017-01-21 12:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-20 16:08 [PATCH net-next] ipv6: add NUMA awareness to seg6_hmac_init_algo() Eric Dumazet
2017-01-21 12:18 ` David Lebrun [this message]
2017-01-22 21:50 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=588351AF.6060203@uclouvain.be \
    --to=david.lebrun@uclouvain.be \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.