From: Eric Dumazet <eric.dumazet@gmail.com>
To: Stanislav Kinsbursky <skinsbursky@parallels.com>
Cc: peterz@infradead.org, mingo@redhat.com, tglx@linutronix.de,
linux-kernel@vger.kernel.org, devel@openvz.org
Subject: Re: [RFC PATCH v2] posix timers: allocate timer id per task
Date: Wed, 17 Oct 2012 15:44:26 +0200 [thread overview]
Message-ID: <1350481466.26103.464.camel@edumazet-glaptop> (raw)
In-Reply-To: <20121017131732.8781.75295.stgit@localhost.localdomain>
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);
next prev parent reply other threads:[~2012-10-17 13:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-17 13:18 Stanislav Kinsbursky
2012-10-17 13:44 ` Eric Dumazet [this message]
2012-10-17 14:19 ` Stanislav Kinsbursky
2012-10-17 13:57 ` Eric Dumazet
2012-10-17 14:26 ` Stanislav Kinsbursky
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=1350481466.26103.464.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=devel@openvz.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=skinsbursky@parallels.com \
--cc=tglx@linutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®