All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dmitry Adamushko" <dmitry.adamushko@domain.hid>
To: rpm@xenomai.org
Cc: Xenomai help <xenomai@xenomai.org>, Jan Kiszka <jan.kiszka@domain.hid>
Subject: Re: [Xenomai-help] Standard linux assignment of processes to CPUs depends on Xenomai Config
Date: Mon, 19 Feb 2007 13:46:34 +0100	[thread overview]
Message-ID: <b647ffbd0702190446h1c3d5387kc350e8008e7e8f61@domain.hid> (raw)
In-Reply-To: <1171888510.9958.8.camel@domain.hid>

On 19/02/07, Philippe Gerum <rpm@xenomai.org> wrote:
> On Mon, 2007-02-19 at 13:13 +0100, Dmitry Adamushko wrote:
> > > > ...
> > > > #ifdef CONFIG_SMP
> > > >         /* Make sure the init sequence is kept on the same CPU when
> > > >            running as a module. */
> > > >         set_cpus_allowed(current, cpumask_of_cpu(0));
> > > > #endif /* CONFIG_SMP */
> > > >
> > > > In fact, "running as a module" seems to be a bit
> > > > misleading here.  Then another macro should be used in addition,
> > > > MODULE or how it's called.
> > > >
> > > > Now guess who is a "current" here? It's "init" (pid 0).
> > > >
> > > > init() -> do_basic_setup() -> do_initcalls() -> ... ->
> > > > __xeno_sys_init() -> xnarch_init()
> > > >
> > > > "init" is a first process to run and all the rest will inherit its
> > > > "cpus_allowed" field.
> > > >
> > > > That's it.
> > > >
> > >
> > > Eh, that's what I call a nice one Dmitry. This is the perfect example of
> > > legacy code stabbing us in the back. We should indeed definitely check
> > > for MODULE && SMP.
> >
> > Yep, as the very least. But even in this case, it's not very nice that
> > via cpus_allowed we affect - scheduling-wise - a process which loads
> > xeno modules and all its children as It's likely to be a shell.
>
> It's insmod.

Oh yep :) Don't think it's a problem then. SMP && MODULE should be ok.

> --
> Philippe.
>

-- 
Best regards,
Dmitry Adamushko


  reply	other threads:[~2007-02-19 12:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-02 15:36 [Xenomai-help] Standard linux assignment of processes to CPUs depends on Xenomai Config M. Koehrer
2007-02-19 10:26 ` Jan Kiszka
2007-02-19 11:01   ` Dmitry Adamushko
2007-02-19 11:23     ` Philippe Gerum
2007-02-19 12:13       ` Dmitry Adamushko
2007-02-19 12:35         ` Philippe Gerum
2007-02-19 12:46           ` Dmitry Adamushko [this message]
2007-02-19 14:11             ` Philippe Gerum
2007-02-19 11:13   ` M. Koehrer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b647ffbd0702190446h1c3d5387kc350e8008e7e8f61@domain.hid \
    --to=dmitry.adamushko@domain.hid \
    --cc=jan.kiszka@domain.hid \
    --cc=rpm@xenomai.org \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.