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]
Message-ID: <507EBE8C.2030707@parallels.com>
Date:	Wed, 17 Oct 2012 18:19:56 +0400
From:	Stanislav Kinsbursky <skinsbursky@...allels.com>
To:	Eric Dumazet <eric.dumazet@...il.com>
CC:	"peterz@...radead.org" <peterz@...radead.org>,
	"mingo@...hat.com" <mingo@...hat.com>,
	"tglx@...utronix.de" <tglx@...utronix.de>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"devel@...nvz.org" <devel@...nvz.org>
Subject: Re: [RFC PATCH v2] posix timers: allocate timer id per task

17.10.2012 17:44, Eric Dumazet пишет:
> On Wed, 2012-10-17 at 17:18 +0400, Stanislav Kinsbursky wrote:
>
>> +static int hash(struct signal_struct *sig, unsigned int nr)
>> +{
>> +	int hash = hash_ptr(sig, POSIX_TIMERS_HASH_BITS);
>> +	return hash ^ hash_32(nr, POSIX_TIMERS_HASH_BITS);
>> +}
>> +
>
> This is quite expensive on 64 bit arches. I suggest instead :
>
> return hash_32(hash32_ptr(sig) ^ nr, POSIX_TIMERS_HASH_BITS);
>
>

I'm not familiar with hashing costs, so sure, I'll update.

-- 
Best regards,
Stanislav Kinsbursky
--
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