lkml.org 
[lkml]   [2008]   [Nov]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    SubjectRe: [PATCH][V3]Make get_user_pages interruptible
    From
    On Mon, Nov 24, 2008 at 12:02 PM, Paul Menage <menage@google.com> wrote:
    > On Fri, Nov 21, 2008 at 5:31 PM, Ying Han <yinghan@google.com> wrote:
    >> From: Paul Menage <menage@google.com>
    >
    > This patch is getting further and further from my original internal
    > changes, so I'm not sure that a From: line from me is appropriate.
    >
    >> */
    >> - if (unlikely(test_tsk_thread_flag(tsk, TIF_MEMDIE)))
    >> - return i ? i : -ENOMEM;
    >> + if (unlikely(sigkill_pending(tsk)))
    >> + return i ? i : -ERESTARTSYS;
    >
    > You've changed the check from sigkill_pending(current) to sigkill_pending(tsk).
    >
    > I originally made that sigkill_pending(current) since we want to avoid
    > tasks entering an unkillable state just because they're doing
    > get_user_pages() on a system that's short of memory. Admittedly for
    > the main case that we care about, mlock() (or an mmap() with
    > MCL_FUTURE set) then tsk==current, but philosophically it seems to me
    > to be more correct to do the check against current than tsk, since
    > current is the thing that's actually allocating the memory. But maybe
    > it would be better to check both?
    In most of cases, tsk==current in get_user_pages(), that is why i
    change current to tsk since
    tsk is a superset of current, no? If that is right, why we need to check both?
    >
    > Paul
    >


    \
     
     \ /
      Last update: 2008-11-24 22:05    [W:0.027 / U:88.580 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site