[RTEMS Project] #3175: Merge FreeBSD timecounter changes from 2015-01-20 to now

RTEMS trac trac at rtems.org
Thu Oct 12 05:09:08 UTC 2017


#3175: Merge FreeBSD timecounter changes from 2015-01-20 to now
-----------------------------+------------------------------
 Reporter:  Sebastian Huber  |       Owner:  Sebastian Huber
     Type:  enhancement      |      Status:  assigned
 Priority:  normal           |   Milestone:  4.12.0
Component:  score            |     Version:  4.12
 Severity:  normal           |  Resolution:
 Keywords:                   |
-----------------------------+------------------------------

Comment (by Konstantin Belousov <kib@…>):

 In [changeset:"b48aeaf4cfdbc289a53ff78f06452298845f8d3a/rtems"
 b48aeaf/rtems]:
 {{{
 #!CommitTicketReference repository="rtems"
 revision="b48aeaf4cfdbc289a53ff78f06452298845f8d3a"
 timecounter: Merge FreeBSD change r303387

 Prevent parallel tc_windup() calls, both parallel top-level calls from
 setclock() and from simultaneous top-level and interrupt. For this,
 tc_windup() is protected with a tc_setclock_mtx spinlock, in the try mode
 when called from hardclock interrupt. If spinlock cannot be obtained
 without spinning from the interrupt context, this means that top-level
 executes tc_windup() on other core and our try may be avoided.

 The boottimebin and boottime variables should be adjusted from
 tc_windup().  To be correct, they must be part of the timehands and
 read using lockless protocol.  Remove the globals and reimplement the
 getboottime(9)/getboottimebin(9) KPI using the timehands read
 protocol.

 Tested by:      pho (as part of the whole patch)
 Reviewed by:    jhb (same)
 Discussed wit:  bde
 Sponsored by:   The FreeBSD Foundation
 MFC after:      1 month
 X-Differential revision:        https://reviews.freebsd.org/D7302

 Update #3175.
 }}}

--
Ticket URL: <http://devel.rtems.org/ticket/3175#comment:17>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list