From: Philippe Gerum <rpm@xenomai.org>
To: Jan Kiszka <jan.kiszka@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-core] [PATCH v2 2/3] nucleus: Include all heaps in statistics
Date: Tue, 20 Oct 2009 14:48:23 +0200 [thread overview]
Message-ID: <1256042903.2862.122.camel@domain.hid> (raw)
In-Reply-To: <4ADDA299.1020505@domain.hid>
On Tue, 2009-10-20 at 13:44 +0200, Jan Kiszka wrote:
> Philippe Gerum wrote:
> > On Mon, 2009-10-19 at 21:09 +0200, Jan Kiszka wrote:
> >> Gilles Chanteperdrix wrote:
> >>> Jan Kiszka wrote:
> >>>> @@ -234,12 +239,65 @@ int xnheap_init(xnheap_t *heap,
> >>>>
> >>>> appendq(&heap->extents, &extent->link);
> >>>>
> >>>> + vsnprintf(heap->name, sizeof(heap->name), name, args);
> >>>> +
> >>>> + spin_lock(&heapq_lock);
> >>>> + appendq(&heapq, &heap->stat_link);
> >>>> + spin_unlock(&heapq_lock);
> >>> You can not use a Linux spinlock in xnheap_init and xnheap_destroy:
> >>> - this breaks the build for the simulator;
> >>> - callers of xnheap_init and xnheap_destroy are not guaranteed to run on
> >>> the root domain.
> >> Oh, yes, unfortunately. That callers appear to be fixable, but that's
> >> probably not worth it at this point.
> >
> > There is nothing to fix here. It's part of the service definition to be
> > able to call it from primary mode.
>
> Strictly spoken not. But given that xnheap_init_mapped does not fulfill
> this promise and that quite a few users have an either-or use of this
> tuple, it doesn't buy us much to allow primary mode.
xnheap_init_mapped is derived from xnheap_init for obvious code reuse
issues, but this does not mean at all that xnheap_init should inherit
the prerequisites of xnheap_init_mapped when it comes to calling
context. Therefore, xnheap_init shall remain callable from primary
context; this is a published API out of tree code may rely on, and there
is absolutely no point in changing its requirements so far.
>
> Jan
>
--
Philippe.
next prev parent reply other threads:[~2009-10-20 12:48 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-19 17:16 [Xenomai-core] [PATCH v2 0/3] Sem heap statistics & mutex auto-cleanup fixes Jan Kiszka
2009-10-19 17:16 ` [Xenomai-core] [PATCH v2 3/3] native: Release fastlock to the proper heap Jan Kiszka
2009-10-19 17:16 ` [Xenomai-core] [PATCH v2 2/3] nucleus: Include all heaps in statistics Jan Kiszka
2009-10-19 18:17 ` Gilles Chanteperdrix
2009-10-19 19:09 ` Jan Kiszka
2009-10-20 10:32 ` Philippe Gerum
2009-10-20 11:44 ` Jan Kiszka
2009-10-20 12:48 ` Philippe Gerum [this message]
2009-10-19 17:16 ` [Xenomai-core] [PATCH v2 1/3] nucleus: Use Linux spin lock for heap list management Jan Kiszka
2009-10-19 18:08 ` Gilles Chanteperdrix
2009-10-19 19:10 ` Jan Kiszka
2009-10-19 19:17 ` Jan Kiszka
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=1256042903.2862.122.camel@domain.hid \
--to=rpm@xenomai.org \
--cc=jan.kiszka@domain.hid \
--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.