From: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
To: "Frank Ch. Eigler" <fche@redhat.com>
Cc: Ankita Garg <ankita@in.ibm.com>,
Arjan van de Ven <arjan@infradead.org>,
linux@bohmer.net, LKML <linux-kernel@vger.kernel.org>,
RT-Users <linux-rt-users@vger.kernel.org>,
Ingo Molnar <mingo@elte.hu>
Subject: Re: [Question] Hooks for scheduler tracing (CFS)
Date: Thu, 26 Jul 2007 14:25:10 -0400 [thread overview]
Message-ID: <20070726182510.GB10324@Krystal> (raw)
In-Reply-To: <20070726162231.GB30643@redhat.com>
* Frank Ch. Eigler (fche@redhat.com) wrote:
> Hi -
>
> On Thu, Jul 26, 2007 at 11:02:26AM -0400, Mathieu Desnoyers wrote:
> > [...]
> > > > The problem is also in _stp_print_flush, not *only* in relay code:
> > > > void _stp_print_flush (void)
> > > > ...
> > > > spin_lock(&_stp_print_lock);
> > > > spin_unlock(&_stp_print_lock);
> > > >
> > > > Those will turn into mutexes with -rt.
> > >
> > > Indeed,
>
> (Though actually that bug was fixed some time ago.)
>
>
> > > plus systemtap-generated locking code uses rwlocks,
> > > local_irq_save/restore or preempt_disable, in various places. Could
> > > someone point to a place that spells out what would be more
> > > appropriate way of ensuring atomicity while being compatible with -rt?
> >
> > AFAIK, for your needs either:
> > [...]
> > - Use per-cpu data with preempt disabling/irq disabling
>
> As in local_irq_save / preempt_disable? Yes, already done.
>
> > - Use the original "real" spin locks/rwlocks (raw_*).
> > [...]
>
> It was unclear from the OLS paper whether the spin_lock_irq* family of
> functions also had to be moved to the raw forms.
>
Yes, you have them to move them too:
linux/spinlock.h:
#ifdef CONFIG_PREEMPT_RT
# define _spin_lock(l) rt_spin_lock(l)
# define _spin_lock_nested(l, s) rt_spin_lock_nested(l, s)
# define _spin_lock_bh(l) rt_spin_lock(l)
# define _spin_lock_irq(l) rt_spin_lock(l)
# define _spin_unlock(l) rt_spin_unlock(l)
# define _spin_unlock_no_resched(l) rt_spin_unlock(l)
# define _spin_unlock_bh(l) rt_spin_unlock(l)
# define _spin_unlock_irq(l) rt_spin_unlock(l)
# define _spin_unlock_irqrestore(l, f) rt_spin_unlock(l)
..
And below, both spin_lock and spin_lock_irqsave use PICK_OP to turn into
their _spin_lock_* equivalent, which are both mapped to rt_spin_lock in
-rt.
Mathieu
--
Mathieu Desnoyers
Computer Engineering Ph.D. Student, Ecole Polytechnique de Montreal
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
next prev parent reply other threads:[~2007-07-26 18:35 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-16 19:46 [Question] Hooks for scheduler tracing (CFS) Remy Bohmer
2007-07-16 19:52 ` Arjan van de Ven
2007-07-16 20:17 ` Remy Bohmer
2007-07-16 21:12 ` Ingo Molnar
2007-07-26 7:28 ` Ankita Garg
2007-07-26 7:35 ` Ingo Molnar
2007-07-26 7:49 ` Ankita Garg
2007-07-26 7:53 ` Ingo Molnar
2007-07-26 9:59 ` Ankita Garg
2007-07-26 11:05 ` Ingo Molnar
2007-07-26 13:06 ` Mathieu Desnoyers
2007-07-26 17:45 ` David J. Wilder
2007-07-26 18:30 ` Mathieu Desnoyers
2007-07-26 13:20 ` Ankita Garg
2007-07-26 13:31 ` Mathieu Desnoyers
2007-07-26 14:47 ` Frank Ch. Eigler
2007-07-26 15:02 ` Mathieu Desnoyers
2007-07-26 16:22 ` Frank Ch. Eigler
2007-07-26 16:32 ` Ankita Garg
2007-07-26 18:25 ` Mathieu Desnoyers [this message]
2007-07-26 15:17 ` Arnaldo Carvalho de Melo
2007-07-16 20:07 ` Mathieu Desnoyers
2007-07-16 23:03 ` LTTng for 2.6.22.1-rt4 Mathieu Desnoyers
[not found] ` <3efb10970707170034t3e1dabe5wc70d41f6ab209c7e@mail.gmail.com>
2007-07-17 14:45 ` LTTng for 2.6.22.1-rt4 (timestamping) Mathieu Desnoyers
2007-07-17 7:23 ` [Question] Hooks for scheduler tracing (CFS) Sébastien Dugué
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=20070726182510.GB10324@Krystal \
--to=mathieu.desnoyers@polymtl.ca \
--cc=ankita@in.ibm.com \
--cc=arjan@infradead.org \
--cc=fche@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=linux@bohmer.net \
--cc=mingo@elte.hu \
/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.