[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070726150226.GB1299@Krystal>
Date: Thu, 26 Jul 2007 11:02:26 -0400
From: Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
To: "Frank Ch. Eigler" <fche@...hat.com>
Cc: Ankita Garg <ankita@...ibm.com>,
Arjan van de Ven <arjan@...radead.org>, linux@...mer.net,
LKML <linux-kernel@...r.kernel.org>,
RT-Users <linux-rt-users@...r.kernel.org>,
Ingo Molnar <mingo@...e.hu>
Subject: Re: [Question] Hooks for scheduler tracing (CFS)
* Frank Ch. Eigler (fche@...hat.com) wrote:
> Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca> writes:
>
> > [...]
> > 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, 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?
>
> - FChE
AFAIK, for your needs either:
- Use atomic ops
- Use per-cpu data with preempt disabling/irq disabling
- Use the original "real" spin locks/rwlocks (raw_*).
- Don't play with timers or wakeups, since this kernel code uses the
"standard" spin locks (sleepable in -rt).
You just don't want to sleep in the tracing code.
Make sure that the sub-buffer switch code respects that too: it is the
most tricky and yet less executed part of the tracing code, so it's easy
for bugs to slip there and yet be undetected for a while.
Since you will likely disable preemption, make sure your tracing code
executes in a deterministic time.
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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists