lkml.org 
[lkml]   [2009]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [tip:timers/urgent] posix timers: fix RLIMIT_CPU && fork()
    On 03/24, Ingo Molnar wrote:
    >
    > * Oleg Nesterov <oleg@redhat.com> wrote:
    >
    > > On 03/23, Oleg Nesterov wrote:
    > > >
    > > > Commit-ID: 37bebc70d7ad4144c571d74500db3bb26ec0c0eb
    > > > Gitweb: http://git.kernel.org/tip/37bebc70d7ad4144c571d74500db3bb26ec0c0eb
    > > > Author: Oleg Nesterov <oleg@redhat.com>
    > > > AuthorDate: Mon, 23 Mar 2009 20:34:11 +0100
    > > > Committer: Ingo Molnar <mingo@elte.hu>
    > > > CommitDate: Mon, 23 Mar 2009 20:43:35 +0100
    > > >
    > > > posix timers: fix RLIMIT_CPU && fork()
    > > >
    > > > See http://bugzilla.kernel.org/show_bug.cgi?id=12911
    > > >
    > > > copy_signal() copies signal->rlim, but RLIMIT_CPU is "lost". Because
    > > > posix_cpu_timers_init_group() sets cputime_expires.prof_exp = 0 and thus
    > > > fastpath_timer_check() returns false unless we have other cpu timers.
    > > >
    > > > This is the minimal fix for 2.6.29 (tested) and 2.6.28. The patch is not
    > > > optimal,
    > >
    > > Ingo, please drop this patch, it is very suboptimal.
    >
    > suboptimal why?

    Because this patch provokes the slow path on every tick if this process
    has rlim[RLIMIT_CPU].rlim_cur != RLIM_INFINITY, even if RLIMIT_CPU is
    not expired yet.

    So I think the initial patch I sent (which modifies copy_signal) is better,
    but first I'd like to re-check the code once again.

    Oleg.



    \
     
     \ /
      Last update: 2009-03-24 22:41    [W:3.013 / U:0.044 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site