summaryrefslogtreecommitdiff
path: root/sys/src/9/port/portclock.c
AgeCommit message (Collapse)Author
2023-04-08kernel: Clear secrets on rebootcinap_lenrek
The idea is that when we reboot, we zero out memory written by processes that have the private flag set (such as factotum and keyfs), and also clear the secrmem pool, which contains TLS keys and the state of the random number generator. This is so the newly booted kernel or firmware will not find these secret keys in memory.
2022-09-259/port: revert timer wheel change, breaks pi4 boot, needs more time ↵cinap_lenrek
investigating
2022-09-249/port: reimplement timers to use timer wheelOri Bernstein
when many processes go to sleep, our old timer would slow to a crawl; this new implementation does not.
2022-08-13dtracy: make timer probes run in interrupt contextOri Bernstein
When probing a timer, we were running in our own kproc, and not in an interrupt context, which meant that we didn't have any access to anything worth sampling, so we didn't give any data back. This moves the probe to the hzclock interrupt, and returns the pc in the probe.
2019-12-07kernel: avoid useless mmu flushes, implement better wait condition for ↵cinap_lenrek
procflushmmu() procflushmmu() returns once all *OTHER* processors that had matching processes running on them flushed ther tlb/mmu state. the caller of procflush...() takes care of flushing "up" by calling flushmmu() later. if the current process matched, then that means m->flushmmu would be set, and hzclock() would call flushmmu() again. to avoid this, we now check up->newtlb in addition to m->flushmmu in hzclock() before calling flushmmu(). we also maintain information on which process on what processor to wait for locally, which helps making progress when multiple procflushmmu()'s are running concurrently. in addition, this makes the wait condition for procflushmmu() more sophisticated, by validating if the processor still runs the selected process and only if it matchatches, considers the MACHP(nm)->flushmmu flag.
2018-12-05kernel: remove unused static variable "sofar" from timerintr() (thanks mischief)cinap_lenrek
2018-12-05kernel: fix tprof on multiprocessorcinap_lenrek
segclock() has to be called from hzclock(), otherwise only processes running on cpu0 would catche the interrupt and the time delta would be wrong. lock the segment when allocating Seg->profile as profile ctl might be issued from multiple processes. Proc->debug qlock is not sufficient. Seg->profile can never be freed or reallocated once set as the timer interrupt accesses it without any locking.
2017-03-29kernel: fix twakeup()/timerdel() race conditioncinap_lenrek
timerdel() did not make sure that the timer function is not active (on another cpu). just acquiering the Timer lock in the timer function only blocks the caller of timerdel()/timeradd() but not the other way arround (on a multiprocessor). this changes the timer code to track activity of the timer function, having timerdel() wait until the timer has finished executing.
2016-01-05kernel: change active.machs from bitmap to char array to support up to 64 ↵cinap_lenrek
cpus on pc64
2014-03-16pc64: amd64 kernel reboot supportcinap_lenrek
2013-06-22alarm: run checkalarms() only on cpu0 (from eriks alarm-once patch)cinap_lenrek
2011-12-12kernel: fix inproper use of malloc/smalloccinap_lenrek
2011-03-30Import sources from 2011-03-30 iso image - libTaru Karttunen
2011-03-30Import sources from 2011-03-30 iso imageTaru Karttunen