mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Andi Kleen <andi@firstfloor.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Andi Kleen <ak@linux.intel.com>,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: [PATCH 1/2] posix-timers: move global timer id management to signal_struct v4
Date: Tue, 20 Sep 2011 11:51:51 +0200 (CEST)	[thread overview]
Message-ID: <alpine.LFD.2.02.1109201121340.2723@ionos> (raw)
In-Reply-To: <1316472096.2455.27.camel@edumazet-laptop>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1195 bytes --]

On Tue, 20 Sep 2011, Eric Dumazet wrote:

> Le mardi 20 septembre 2011 à 00:36 +0200, Andi Kleen a écrit :
> > > This means idr_pre_get() consumes 6528 bytes of spare space per process,
> > > even if only one posix timer is used.
> > 
> > And? Given the now normal bloat level in the kernel that's small
> > potatoes.

That's not really a good excuse to create more bloat without spending
a few brain cycles.

> I see. Oh yes, you work for a known hardware vendor.

LOL

Aside of that this patch already adds sizeof(idr) + sizeof(mutex) to
every signal_struct unconditionally. There is no reason to do that. We
simply can have a pointer to

struct posix_timer_idr {
	struct mutex lock;
	struct idr idr;
};

and allocate that when a process creates the first posix timer.

Thinking more about that the question arises whether the global idr is
in fact a real scalability issue. The number of posix timers actually
used is usually pretty low and I doubt that they are created/deleted
with high frequency.

If it's just about limiting the per process posix timer allocation we
can achieve the same goal with a simple per process counter which
holds the number of allocated timers.

Thanks,

	tglx

  parent reply	other threads:[~2011-09-20  9:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-19 21:48 Andi Kleen
2011-09-19 21:48 ` [PATCH 2/2] posix-timers: limit the number of posix timers per process v2 Andi Kleen
2011-09-19 22:23 ` [PATCH 1/2] posix-timers: move global timer id management to signal_struct v4 Eric Dumazet
2011-09-19 22:36   ` Andi Kleen
2011-09-19 22:41     ` Eric Dumazet
2011-09-19 23:07       ` Eric Dumazet
2011-09-19 23:11       ` Andi Kleen
2011-09-19 23:15         ` Eric Dumazet
2011-09-20  9:51       ` Thomas Gleixner [this message]
2011-09-20  9:19 ` 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.1109201121340.2723@ionos \
    --to=tglx@linutronix.de \
    --cc=ak@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=andi@firstfloor.org \
    --cc=eric.dumazet@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterz@infradead.org \
    /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®