lkml.org 
[lkml]   [2011]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] posix-timers: move global timer id management to signal_struct v4
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
\
 
 \ /
  Last update: 2011-09-20 11:53    [W:0.109 / U:0.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site