From: Thomas Gleixner <tglx@linutronix.de>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Stanislav Kinsbursky <skinsbursky@parallels.com>,
peterz@infradead.org, mingo@redhat.com, devel@openvz.org,
linux-kernel@vger.kernel.org, xemul@parallels.com
Subject: Re: [PATCH v5] posix timers: allocate timer id per process
Date: Tue, 23 Oct 2012 23:47:33 +0200 (CEST) [thread overview]
Message-ID: <alpine.LFD.2.02.1210232345200.2756@ionos> (raw)
In-Reply-To: <1350978723.8609.1555.camel@edumazet-glaptop>
On Tue, 23 Oct 2012, Eric Dumazet wrote:
> On Tue, 2012-10-23 at 11:40 +0400, Stanislav Kinsbursky wrote:
> > This patch is required CRIU project (www.criu.org).
> > To migrate processes with posix timers we have to make sure, that we can
> > restore posix timer with proper id.
> > Currently, this is not true, because timer ids are allocated globally.
> > So, this is precursor patch and it's purpose is make posix timer id to be
> > allocated per process.
> >
> > Patch replaces global idr with global hash table for posix timers and
> > makes timer ids unique not globally, but per process. Next free timer id is
> > type of integer and stored on signal struct (posix_timer_id). If free timer id
> > reaches negative value on timer creation, it will be dropped to zero and
> > -EAGAIN will be returned to user.
> >
> > Hash table has 512 slots.
> > Key is constructed as follows:
> > key = hash_32(hash_32(current->signal) ^ posix_timer_id));
> >
> > Note: with this patch, id, returned to user, is not the minimal free
> > amymore. It means, that id, returned to user space in loop, listed below, will
> > be increasing on each iteration till INT_MAX and then dropped to zero:
> >
> > while(1) {
> > id = timer_create(...);
> > timer_delete(id);
> > }
> >
> > Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
> >
> > ---
>
> SGTM
Not so good to me.
> Signed-off-by: Eric Dumazet <edumazet@google.com>
And that should be either an Acked-by or a Reviewed-by. You can't sign
off on patches which have not been submitted or transported by you.
Thanks,
tglx
next prev parent reply other threads:[~2012-10-23 21:47 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-23 7:40 Stanislav Kinsbursky
2012-10-23 7:52 ` Eric Dumazet
2012-10-23 21:47 ` Thomas Gleixner [this message]
2012-10-23 21:53 ` Eric Dumazet
2012-10-23 22:33 ` Thomas Gleixner
2012-10-24 3:02 ` Eric Dumazet
2012-10-24 5:47 ` Ingo Molnar
2012-10-23 9:50 ` Thomas Gleixner
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=alpine.LFD.2.02.1210232345200.2756@ionos \
--to=tglx@linutronix.de \
--cc=devel@openvz.org \
--cc=eric.dumazet@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=skinsbursky@parallels.com \
--cc=xemul@parallels.com \
/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
Powered by JetHome