lkml.org 
[lkml]   [2015]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [RFC PATCH 09/18] kthread: Make it easier to correctly sleep in iterant kthreads
    From
    Date
    On Mon, 2015-06-08 at 12:01 +0200, Petr Mladek wrote:

    > Just to be sure. Do you suggest to use TASK_IDLE everywhere in
    > kthreads or only when the uninterruptible sleep is really needed?

    Always, only use INTERRUPTIBLE when you're actually interruptible, that
    is you want signals or such muck to terminate your wait.

    > IMHO, we should not use TASK_IDLE in freezable kthreads because
    > it would break freezing.

    How so? The task is IDLE, its not doing anything.

    > Well, we could freezable_schedule() but only
    > on locations where it is safe to get freezed. Anyway, we need to
    > be careful here.

    s/freezed/frozen/

    Bah, you made me look at the freezer code, karma reduction for you.

    And this is the arch typical freeze point if ever there was one, you're
    checking kthread_stop, if we can terminate the kthread, we can certainly
    get frozen.

    > BTW: What is the preferred way of freezing, please? Is it better
    > to end up in the fridge or is it fine to call freezer_do_not_count();
    > or set PF_NOFREEZE when it is safe?

    freezable_schedule() is fine in this case.


    \
     
     \ /
      Last update: 2015-06-08 14:01    [W:2.135 / U:0.024 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site