public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Stanislav Kinsbursky <skinsbursky@parallels.com>
Cc: mingo@redhat.com, tglx@linutronix.de,
	linux-kernel@vger.kernel.org, devel@openvz.org
Subject: Re: [RFC PATCH] posix timers: allocate timer id per task
Date: Mon, 15 Oct 2012 19:04:05 +0200	[thread overview]
Message-ID: <1350320645.2336.38.camel@laptop> (raw)
In-Reply-To: <20121015161559.7806.72762.stgit@localhost.localdomain>

On Mon, 2012-10-15 at 20:17 +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 task.
> 
> Patch replaces global idr with global hash table for posix timers and
> makes timer ids unique not globally, but per task. 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 is size of page (4KB).
> Key is constructed as follows:
> key = hash_ptr(current->signal) ^ hash_32(posix_timer_id); 

but but but.. isn't this what namespaces were invented for to solve? Why
not use the regular namespace infrastructure?


  parent reply	other threads:[~2012-10-15 17:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-15 16:17 [RFC PATCH] posix timers: allocate timer id per task Stanislav Kinsbursky
2012-10-15 16:34 ` Eric Dumazet
2012-10-16  7:57   ` Stanislav Kinsbursky
2012-10-15 17:04 ` Peter Zijlstra [this message]
2012-10-16  8:00   ` Stanislav Kinsbursky
2012-10-15 19:08 ` Thomas Gleixner
2012-10-16  8:08   ` 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=1350320645.2336.38.camel@laptop \
    --to=peterz@infradead.org \
    --cc=devel@openvz.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --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