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: <1358986694.12374.1267.camel@edumazet-glaptop>
Date:	Wed, 23 Jan 2013 16:18:14 -0800
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Michel Lespinasse <walken@...gle.com>
Cc:	Rik van Riel <riel@...hat.com>, Ingo Molnar <mingo@...hat.com>,
	"Paul E. McKenney" <paulmck@...ibm.com>,
	David Howells <dhowells@...hat.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Eric Dumazet <edumazet@...gle.com>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Manfred Spraul <manfred@...orfullife.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH 4/6] kernel: faster queue spinlock implementation

On Tue, 2013-01-22 at 15:13 -0800, Michel Lespinasse wrote:
>  {
> -	__q_spin_unlock(lock, node);
> -	preempt_enable_no_resched();
> -	local_bh_enable_ip((unsigned long)__builtin_return_address(0));
> +	unsigned int cpu, i;
> +	struct q_spinlock_token *token;
> +	for_each_possible_cpu(cpu)
> +		for (i = 0; i < 2; i++) {
> +			token = kmalloc(sizeof(struct q_spinlock_alloc_token),
> +					GFP_KERNEL);
> +			BUG_ON(!token);
> +			token->wait = false;
> +			per_cpu(q_spinlock_token[i], cpu) = token;
> +		}

You might use kmalloc_node(...   , cpu_to_node(cpu)) to spread these
tokens on all nodes.


--
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