lkml.org 
[lkml]   [2006]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 2/5] Direct Migration V9: migrate_pages() extension
    Christoph Lameter <clameter@sgi.com> wrote:
    >
    > + for(i = 0; i < 10 && page_mapped(page); i++) {
    > + int rc = try_to_unmap(page);
    > +
    > + if (rc == SWAP_SUCCESS)
    > + break;
    > + /*
    > + * If there are other runnable processes then running
    > + * them may make it possible to unmap the page
    > + */
    > + schedule();
    > + }

    The schedule() in state TASK_RUNNING simply won't do anything unless this
    process happens to have been preempted. You'll find that an ndelay(100) is
    about as useful.

    So I'd suggest that this part needs a bit of a rethink. If we really need
    to run other processes then try a schedule_timeout_uninterruptible(1). If
    not, just remove the loop.

    Please stick a printk in there, work out how often and under which
    workloads that loop is actually doing something useful.
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2006-01-11 06:54    [W:0.039 / U:0.736 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site