[lkml]   [2009]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectDRM lock ordering fix series
    Here's hopefully the final attempt at the lock ordering fix for GEM.  The
    problem was introduced in .29 with the GTT mapping support. We hashed out
    a few potential fixes on the mailing list and at OSTS. Peter's plan was
    to use get_user_pages, but it has significant CPU overhead (10% cost to text
    rendering, though part of that is due to some dumb userland code. But it's
    dumb userland code we're all running). Linus's plan was to just try the
    atomic copy_from_user and see if it succeeds, then fall back to allocating
    space and copying in to the kernel since it'll "never" happen. Except that
    we can't allocate as much as a user may try to copy in in kernel space, so
    we'd have had to break up the write into multiple passes dropping the lock
    in between, and I wasn't comfortable with that.

    So, this time, I try the optimistic Linus path, and if not, fall back to the
    slow Peter Zijlstra path. It seems to be working, and I forced the
    slow paths and tested each case against some regression tests I have, so I
    think it's good to go. But I'd love some Reviewed-bys on the ones that are
    missing it, because this morning I had to fix 9 bugs in 60 LOC, and that's
    just what I caught with testcases.

     \ /
      Last update: 2009-03-25 22:47    [W:0.017 / U:24.412 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site