lkml.org 
[lkml]   [2008]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: posix-cpu-timers revamp
Date
> One quick note:  this inline isn't needed for the 2b solution (allocate
> percpu storage in copy_signal CLONE_THREAD case), since if there's more
> than one thread there'll always be a percpu area and if there's only one
> thread the summation code won't be entered.

That's true. I still think it's a good idea to have it, even if it winds
up being empty in the variants we really use. The principle is that the
new set of types/functions could be used to implement exactly what we have
now. In fact, it's usually best to do a series of small patches that start
with introducing the abstraction while not changing anything.

> And another quick note: It appears that with the "allocate percpu
> storage in copy_signal CLONE_THREAD case" mechanism, I don't need to
> worry about allocating it anywhere else. If I need it (which is only in
> the case of multiple threads and an interval timer) then I'll have it
> because it was allocated with the second thread.

That's correct.

> So I just eliminate the allocation in do_setitimer() entirely.

Again, I'd leave the call to the inline that would do it.
For this implementation plan, its body is:
BUG_ON(!task->signal->cputime.totals && !thread_group_empty(task));


Thanks,
Roland


\
 
 \ /
  Last update: 2008-04-02 21:51    [W:0.811 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site