[lkml]   [2010]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH 1/2] lib: more scalable list_sort()
    On Sun, Jan 24, 2010 at 09:59:06PM +0100, Andi Kleen wrote:
    > > Similarly, adding cond_resched() to list_sort means you can stop
    > > worrying about the scheduling latency impact of sorting long lists.
    > > I fail to see why you're making such a big deal out of this.....
    > It's not easy to add it to a low level library function like list_sort()
    > because you would need to ensure that all callers are allowed to sleep.

    might_sleep() annotations are typically used in this case....

    > Or even if all callers currently allow it future ones might not.

    You're trying to make this way more complex than the current
    requirements need it to be. Just declaring a simple rule -
    "list_sort() can sleep" - and all these problems go away until
    someone really needs list sorting in atomic context.


    Dave Chinner

     \ /
      Last update: 2010-01-25 04:45    [W:2.583 / U:0.404 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site