linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Pavel Emelyanov <xemul@parallels.com>
Cc: Ingo Molnar <mingo@redhat.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Michael Kerrisk <mtk.manpages@gmail.com>,
	Matthew Helsley <matt.helsley@gmail.com>,
	linux-api@vger.kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3] posix timers: Allocate timer id per process (v2)
Date: Fri, 8 Mar 2013 13:50:28 +0100 (CET)	[thread overview]
Message-ID: <alpine.LFD.2.02.1303081349020.22263@ionos> (raw)
In-Reply-To: <512665E1.4040800@parallels.com>

Pavel,

On Thu, 21 Feb 2013, Pavel Emelyanov wrote:

> 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);
> }
> 
> In this version the helpers from include/linux/hashtable.h are used
> instead of hand-made hash-table.

I think the patches are ready to go, though the changelog needs quite
some care.

It's explaining what the patch does and not why. Can you please
rework?

Thanks,

	tglx

  reply	other threads:[~2013-03-08 12:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-21 18:21 [PATCH 0/3] posix timers: Extend kernel API to report more info about timers (v2) Pavel Emelyanov
2013-02-21 18:22 ` [PATCH 1/3] posix timers: Allocate timer id per process (v2) Pavel Emelyanov
2013-03-08 12:50   ` Thomas Gleixner [this message]
2013-02-21 18:22 ` [PATCH 2/3] posix-timers: Introduce /proc/<pid>/timers file Pavel Emelyanov
2013-02-21 18:22 ` [PATCH 3/3] posix-timers: Show sigevent info in proc file Pavel Emelyanov
2013-03-08  8:40 ` [PATCH 0/3] posix timers: Extend kernel API to report more info about timers (v2) Pavel Emelyanov
2013-03-08  9:56   ` Thomas Gleixner
2013-03-11  9:11 [PATCH 0/3] posix timers: Extend kernel API to report more info about timers (v3) Pavel Emelyanov
2013-03-11  9:12 ` [PATCH 1/3] posix timers: Allocate timer id per process (v2) Pavel Emelyanov

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.1303081349020.22263@ionos \
    --to=tglx@linutronix.de \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt.helsley@gmail.com \
    --cc=mingo@redhat.com \
    --cc=mtk.manpages@gmail.com \
    --cc=peterz@infradead.org \
    --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;
as well as URLs for NNTP newsgroup(s).