lkml.org 
[lkml]   [2007]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] kthread: Don't depend on work queues
    On 04/10, Eric W. Biederman wrote:
    >
    > static int kthread(void *_create)
    > {
    > struct kthread_create_info *create = _create;
    > int (*threadfn)(void *data);
    > void *data;
    > - sigset_t blocked;
    > int ret = -EINTR;
    >
    > - kthread_exit_files();
    > -
    > - /* Copy data: it's on keventd's stack */
    > + /* Copy data: it's on kthread's stack */
    > threadfn = create->threadfn;
    > data = create->data;
    >
    > - /* Block and flush all signals (in case we're not from keventd). */
    > - sigfillset(&blocked);
    > - sigprocmask(SIG_BLOCK, &blocked, NULL);
    > - flush_signals(current);
    > -
    > - /* By default we can run anywhere, unlike keventd. */
    > - set_cpus_allowed(current, CPU_MASK_ALL);

    The above is OK, but I believe you should add set_cpus_allowed() to
    kthreadd_setup(). Note that kthreadd() is forked after init_idle().

    Oleg.

    -
    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: 2007-04-11 15:19    [W:0.021 / U:122.192 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site