Date: Sun, 9 Feb 2003 00:40:40 -0800 (PST) From: Julian Elischer <julian@elischer.org> To: Tim Robbins <tjr@FreeBSD.org> Cc: Bruce Evans <bde@zeta.org.au>, Julian Elischer <julian@FreeBSD.org>, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/sys proc.h src/sys/kern kern_clock.c Message-ID: <Pine.BSF.4.21.0302090036030.31703-100000@InterJet.elischer.org> In-Reply-To: <20030209192134.A10064@dilbert.robbins.dropbear.id.au>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 9 Feb 2003, Tim Robbins wrote: > On Sat, Feb 08, 2003 at 10:06:46PM -0800, Julian Elischer wrote: > > [...] > > So it turns out the code is correct. > > Thanks for the explanation. It seems reasonable now. My other concern > is protecting addupc_{intr,task}() from profil() and also protecting > addupc_task() from itself. There is LOTS of room for improvement. We are just trying to get thing working in a threaded world. > > There's an splstatclock() call in profil() which was presumably there to > stop profil() from interfering with p_stats->p_prof while addupc_* were > running. Maybe we could have a spinlock in struct uprof to synchronise > access to it... that is one possibilty. > > I'm not entirely comfortable about this piece of code in the presence > of multiple threads, either. It looks like it could lose ticks. yes, on an MP machine it can. David and I discussed this but we decided that the problem is not high enough for us to work on yet.. (if ever :-) > addr = prof->pr_base + i; > if (copyin(addr, &v, sizeof(v)) == 0) { > v += ticks; > if (copyout(&v, addr, sizeof(v)) == 0) > > > Tim > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0302090036030.31703-100000>