From owner-svn-src-all@FreeBSD.ORG Tue Mar 31 15:37:02 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B8C8A73B; Tue, 31 Mar 2015 15:37:02 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8E7436D6; Tue, 31 Mar 2015 15:37:02 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 7EB0DB976; Tue, 31 Mar 2015 11:37:01 -0400 (EDT) From: John Baldwin To: Randall Stewart Subject: Re: svn commit: r280785 - in head/sys: kern netgraph/atm/sscop netgraph/atm/uni sys Date: Tue, 31 Mar 2015 09:40:58 -0400 Message-ID: <5710983.pHS9DoOdY8@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <26047F0C-A975-4DAC-9077-31B5EC4902DA@netflix.com> References: <201503281250.t2SCoOkt020297@svn.freebsd.org> <32487399.PTq7ESkWJT@ralph.baldwin.cx> <26047F0C-A975-4DAC-9077-31B5EC4902DA@netflix.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 31 Mar 2015 11:37:01 -0400 (EDT) Cc: svn-src-head@freebsd.org, Randall Stewart , svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Mar 2015 15:37:02 -0000 On Monday, March 30, 2015 06:26:25 PM Randall Stewart wrote: >=20 > On Mar 30, 2015, at 9:16 AM, John Baldwin wrote: >=20 > > 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 > >>=20 > >> 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 activ= e > >> flag (the one expected to be played with by callers in MPSAFE) wi= thout > >> 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). > >>=20 > >> Differential Revision: htts://reviews.freebsd.org/D1894 > >> Reviewed by: .. timed out but looked at by jhb, imp, adrian hsela= sky > >> tested by hiren and netflix. > >> Sponsored by:=09Netflix Inc. > >=20 > > Please use NOCPU rather than -1 directly for the CPU field when not= > > moving a callout. > >=20 >=20 > John: >=20 > I have made *all* of your suggested changes, adopting the comments an= d > moving migration to kern_timeout.c.. thanks.. >=20 > Now as to the=20 >=20 > -1 -> NOCPU >=20 > 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=20 > #include > to everyone that uses the callout.h and does not have it already=E2=80= =A6 (putting it into callout.h does not work) .. sigh.. >=20 > 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 >=20 > Here is what has to change, do you really think that this is worth it= ? >=20 > Note I did not look into moving NOCPU in proc.h it says it means no C= PU is present > which is sort of the meaning we want.. I am not sure if the define co= uld be moved .. but > that too may be yet another string... >=20 > 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 (at least for the kernel) if bde@ would all= ow it. I don't think changing all those files is appropriate. (Also, seems like an odd place for NOCPU now, it should re= ally be in 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.) --=20 John Baldwin