From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Yuxin Ren <ryx@gwmail.gwu.edu>
Cc: lttng-dev <lttng-dev@lists.lttng.org>
Subject: Re: real time Userspace RCU
Date: Fri, 15 Apr 2016 10:09:14 -0700 [thread overview]
Message-ID: <20160415170914.GH3755__23251.6254684471$1460740166$gmane$org@linux.vnet.ibm.com> (raw)
In-Reply-To: <CAAKbDreymPV6TTK_g_q8O5bSY7bb53izrf0_g0B5ij1zaS1P9A@mail.gmail.com>
Hello, Yuxin,
Currently, userspace RCU does not prevent this sort of priority-inversion
issue.
We have not yet had complaints about it, but did you have any thoughts for
a good implementation tht would avoid this sort of priority inversion?
Thanx, Paul
On Fri, Apr 15, 2016 at 11:46:48AM -0400, Yuxin Ren wrote:
> I really appreciate your reply!!
>
> I have one more question.
> >From real time aspect, preemption of URCU read-side critical sections
> can cause priority-inversion issue.
> Does current URCU implementation deal with this problem?
> And if so, how does it solve this?
>
> Thanks
> Yuxin
>
> On Thu, Mar 31, 2016 at 7:22 AM, Paul E. McKenney
> <paulmck@linux.vnet.ibm.com> wrote:
> > On Thu, Mar 31, 2016 at 09:20:07AM +0800, Yuxin Ren wrote:
> >> Thank you all!!
> >>
> >> I agree URCU does timing quite well.
> >> But are there any formal response time analysis for URCU/RCU (both
> >> read and update path)?
> >
> > Not that I know of. You could be the first!
> >
> >> Or could anyone guide me how to do RTA for URCU/RCU?
> >
> > Compile something with a simple RCU read-side critical section, and then
> > count the instructions. QSBR will of course work best, but MB will also
> > have good bounds. Signal-based will be a bit more complicated.
> >
> > Much depends on what type of RTA you want to do. Brandenburg's
> > dissertation has quite a bit of info and many citations:
> >
> > http://www.cs.unc.edu/~bbb/diss/
> >
> > You can also take an experimental approach, though a great many
> > runs are required. OSADL (https://www.osadl.org/) does quite a
> > bit of this work on -rt Linux.
> >
> > Thanx, Paul
> >
> >> Thanks again.
> >>
> >> On Fri, Mar 11, 2016 at 10:00 PM, Mathieu Desnoyers
> >> <mathieu.desnoyers@efficios.com> wrote:
> >> > ----- On Mar 11, 2016, at 6:45 AM, Paul E. McKenney paulmck@linux.vnet.ibm.com wrote:
> >> >
> >> >> On Thu, Mar 10, 2016 at 08:53:05PM +0000, Mathieu Desnoyers wrote:
> >> >>> ----- On Mar 10, 2016, at 3:33 PM, Yuxin Ren ryx@gwmail.gwu.edu wrote:
> >> >>>
> >> >>> > Thank you for your reply.
> >> >>> >
> >> >>> > I want to generally understand how to apply urcu to real time systems.
> >> >>> > I know real time system focus on predictability on both timing and
> >> >>> > memory consumption.
> >> >>> > So how does real time urcu support predictability?
> >> >>> > Could you provide me some papers, documents or any materials about any
> >> >>> > aspect of real time urcu?
> >> >>>
> >> >>> Adding Paul E. McKenney in CC, who may have some thoughts on this
> >> >>> topic.
> >> >>
> >> >> URCU does timing quite well, given that the read-side primitives each
> >> >> execute a fixed sequence of instructions. Updates using call_rcu()
> >> >> can be used to minimize update-side latency, but if you need to bound
> >> >> memory overhead, the best way to do that is to make sure that updates
> >> >> are not on the critical path, and then use synchronize_rcu() instead
> >> >> of call_rcu(). In that case, the total amount of memory waiting for
> >> >> reclamation is bounded by the maximum size of an RCU-protected memory
> >> >> block times the number of threads.
> >> >
> >> > An intermediate solution if both update throughput and bounded-memory
> >> > are required (but the application would not have real-time constraints
> >> > on updates) would be to use the defer_rcu() API in liburcu. It amortizes
> >> > the cost of synchronize_rcu() over many defer_rcu() calls with a worker
> >> > thread, but only up to an upper bound. When the upper bound is reached,
> >> > the defer queue call empties the defer queue itself.
> >> >
> >> > Thanks,
> >> >
> >> > Mathieu
> >> >
> >> >>
> >> >> So can you design your application so that updates are off the critical
> >> >> path? If so, you can get both bounded read-side accesses and bounded
> >> >> memory footprint.
> >> >>
> >> >> This of course assumes that your data structures are simple enough
> >> >> that readers don't need to use retry techniques.
> >> >>
> >> >> The following info might be helpful:
> >> >>
> >> >> http://www2.rdrop.com/users/paulmck/realtime/paper/DetSyncRCU.2009.08.18a.pdf
> >> >> http://www2.rdrop.com/users/paulmck/realtime/paper/DetSyncRCU.2009.09.29a.pdf
> >> >>
> >> >> http://www2.rdrop.com/users/paulmck/realtime/paper/RTLWS2012occcRT.2012.10.19e.pdf
> >> >>
> >> >> It also depends on your timeframe. Microseconds? Life is hard.
> >> >> Milliseconds? Care is required, but you have a fair amount of freedom.
> >> >> Seconds? Life is not so hard. Unless you need to do two seconds of
> >> >> computation in one second or some such. ;-)
> >> >>
> >> >> Thanx, Paul
> >> >>
> >> >>> Thanks,
> >> >>>
> >> >>> Mathieu
> >> >>>
> >> >>> >
> >> >>> > Thanks again!
> >> >>> >
> >> >>> > On Thu, Mar 10, 2016 at 1:52 PM, Michel Dagenais
> >> >>> > <michel.dagenais@polymtl.ca> wrote:
> >> >>> >> Real-time and embedded systems is an important current focus for the LTTng
> >> >>> >> toolchain research. Do you have specific needs for userspace RCU?
> >> >>> >>
> >> >>> >> ----- Mail original -----
> >> >>> >>> Hi,
> >> >>> >>>
> >> >>> >>> Is there any work or research about Userspace RCU on real time or
> >> >>> >>> embedded systems?
> >> >>> >>> Any information is welcome.
> >> >>> >>>
> >> >>> >>> Thanks a lot!
> >> >>> >>> Yuxin
> >> >>> >>> _______________________________________________
> >> >>> >>> lttng-dev mailing list
> >> >>> >>> lttng-dev@lists.lttng.org
> >> >>> >>> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
> >> >>> >>>
> >> >>> > _______________________________________________
> >> >>> > lttng-dev mailing list
> >> >>> > lttng-dev@lists.lttng.org
> >> >>> > https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
> >> >>>
> >> >>> --
> >> >>> Mathieu Desnoyers
> >> >>> EfficiOS Inc.
> >> >>> http://www.efficios.com
> >> >
> >> > --
> >> > Mathieu Desnoyers
> >> > EfficiOS Inc.
> >> > http://www.efficios.com
> >>
> >
>
_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
next prev parent reply other threads:[~2016-04-15 17:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAAKbDrcMU2rgStU1uFFg1Syk-B4ZOU2R7aC0On946gCXJ5DnMg@mail.gmail.com>
2016-03-10 18:52 ` real time Userspace RCU Michel Dagenais
[not found] ` <1138868550.112232059.1457635938477.JavaMail.zimbra@polymtl.ca>
2016-03-10 20:33 ` Yuxin Ren
[not found] ` <CAAKbDrdac6jYEu4kjNq8kzCxQkdxJGBHN2+fFCh9wOiotoSYiw@mail.gmail.com>
2016-03-10 20:53 ` Mathieu Desnoyers
[not found] ` <1899542687.22326.1457643185957.JavaMail.zimbra@efficios.com>
2016-03-11 11:45 ` Paul E. McKenney
2016-03-11 12:33 ` Michel Dagenais
[not found] ` <20160311114507.GQ3452@linux.vnet.ibm.com>
2016-03-11 14:00 ` Mathieu Desnoyers
[not found] ` <1882016137.22940.1457704838823.JavaMail.zimbra@efficios.com>
2016-03-31 1:20 ` Yuxin Ren
[not found] ` <CAAKbDregDg9y4UfKMESBekYW3Vrt=DFrbVvS_ut80QXCpwMELw@mail.gmail.com>
2016-03-31 11:22 ` Paul E. McKenney
[not found] ` <20160331112222.GT4287@linux.vnet.ibm.com>
2016-04-15 15:46 ` Yuxin Ren
[not found] ` <CAAKbDreymPV6TTK_g_q8O5bSY7bb53izrf0_g0B5ij1zaS1P9A@mail.gmail.com>
2016-04-15 17:09 ` Paul E. McKenney [this message]
2016-03-10 16:58 Yuxin Ren
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='20160415170914.GH3755__23251.6254684471$1460740166$gmane$org@linux.vnet.ibm.com' \
--to=paulmck@linux.vnet.ibm.com \
--cc=lttng-dev@lists.lttng.org \
--cc=ryx@gwmail.gwu.edu \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).