On Monday, March 30, 2015 06:26:25 PM Randall Stewart wrote: > > On Mar 30, 2015, at 9:16 AM, John Baldwin <j...@freebsd.org> wrote: > > > On Saturday, March 28, 2015 12:50:24 PM Randall Stewart wrote: > >> Author: rrs > >> Date: Sat Mar 28 12:50:24 2015 > >> New Revision: 280785 > >> URL: https://svnweb.freebsd.org/changeset/base/280785 > >> > >> Log: > >> Change the callout to supply -1 to indicate we are not changing > >> CPU, also add protection against invalid CPU's as well as > >> split c_flags and c_iflags so that if a user plays with the active > >> flag (the one expected to be played with by callers in MPSAFE) without > >> a lock, it won't adversely affect the callout system by causing a corrupt > >> list. This also means that all callers need to use the macros and *not* > >> play with the falgs directly (like netgraph used to). > >> > >> Differential Revision: htts://reviews.freebsd.org/D1894 > >> Reviewed by: .. timed out but looked at by jhb, imp, adrian hselasky > >> tested by hiren and netflix. > >> Sponsored by: Netflix Inc. > > > > Please use NOCPU rather than -1 directly for the CPU field when not > > moving a callout. > > > > John: > > I have made *all* of your suggested changes, adopting the comments and > moving migration to kern_timeout.c.. thanks.. > > Now as to the > > -1 -> NOCPU > > This is like pulling on a string on your sweater.. the only sensible solution > that > I could come up with after chatting with Lawrence is to add > #include <sys/proc.h> > to everyone that uses the callout.h and does not have it already… (putting it > into callout.h does not work) .. sigh.. > > Now for this cosmetic change I end up with the following changes (and as yet > I have > not built LINT or universe so there may be more).. I have spent about 2 hours > on this > so far and I can at least build a kernel with the change for amd64 :-0 > > Here is what has to change, do you really think that this is worth it? > > Note I did not look into moving NOCPU in proc.h it says it means no CPU is > present > which is sort of the meaning we want.. I am not sure if the define could be > moved .. but > that too may be yet another string... > > Is this worth it, or do you have another idea on how best to do this???
Ugh. :( I guess leave it at -1 for now. Another alternative would be to move NOCPU to <sys/param.h> (at least for the kernel) if bde@ would allow it. I don't think changing all those files is appropriate. (Also, <sys/proc.h> seems like an odd place for NOCPU now, it should really be in <sys/smp.h> if not param.h. I understand why it was first added in proc.h, but it is now used in many more places than just td_oncpu.) -- John Baldwin _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"