9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] cpuid
@ 2010-04-04  2:43 erik quanstrom
  2010-04-05  6:30 ` Russ Cox
  0 siblings, 1 reply; 4+ messages in thread
From: erik quanstrom @ 2010-04-04  2:43 UTC (permalink / raw)
  To: 9fans

i updated aux/cpuid to allow one to specify a mach on
which to run cpuid.  unfortunately, /proc/%d/ctl doesn't
really guarentee when target will be running on the
requested mach.  as a defense, sleep(1) is called
after wiring, but i'm not convinced that sleep must always
sched and thus potentially could return still on the wrong
mach.  and there is no way for a proc to request its current
mach number to verifiy that it has been wired.  (unless you
count picking through the binary /proc/%d/proc structure,
which seems too messy to count.)

perhaps this is all just paranoia, but in order to get /dev/reboot
working reliably (ie. in a loop for more than 10 minutes),
loops like this were required:

	for(;;){
		procwired(up, n);
		sched();
		if(m->machno == n)
			break;
	}

perhaps a call from user space solves all these problems, but
/dev/reboot is esentially a call from user space, so if it does,
why that could be is not currently clear to me.

perhaps it would make sense to add /proc/%d/mach or even
/dev/machno or even /dev/wire which would be in a position
to guarentee wiring.

- erik



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-04-05 19:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-04  2:43 [9fans] cpuid erik quanstrom
2010-04-05  6:30 ` Russ Cox
2010-04-05 13:28   ` erik quanstrom
2010-04-05 19:54     ` Russ Cox

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).