From owner-svn-src-all@FreeBSD.ORG Thu Nov 29 08:50:55 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 19D814DB; Thu, 29 Nov 2012 08:50:55 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.dawidek.net (garage.dawidek.net [91.121.88.72]) by mx1.freebsd.org (Postfix) with ESMTP id 9F5D88FC14; Thu, 29 Nov 2012 08:50:54 +0000 (UTC) Received: from localhost (58.wheelsystems.com [83.12.187.58]) by mail.dawidek.net (Postfix) with ESMTPSA id 02CE989E; Thu, 29 Nov 2012 09:48:55 +0100 (CET) Date: Thu, 29 Nov 2012 09:52:08 +0100 From: Pawel Jakub Dawidek To: Andre Oppermann Subject: Re: svn commit: r241726 - head/sys/kern Message-ID: <20121129085208.GA1370@garage.freebsd.pl> References: <201210191015.q9JAFWm5060261@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="k+w/mQv8wyuph6w0" Content-Disposition: inline In-Reply-To: <201210191015.q9JAFWm5060261@svn.freebsd.org> X-OS: FreeBSD 10.0-CURRENT amd64 User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 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: Thu, 29 Nov 2012 08:50:55 -0000 --k+w/mQv8wyuph6w0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Oct 19, 2012 at 10:15:32AM +0000, Andre Oppermann wrote: > Author: andre > Date: Fri Oct 19 10:15:32 2012 > New Revision: 241726 > URL: http://svn.freebsd.org/changeset/base/241726 >=20 > Log: > Move UMA socket zone initialization from uipc_domain.c to uipc_socket.c > into one place next to its other related functions to avoid confusion. I think you can remove include of vm/uma.h from uipc_domain.c now. > Modified: > head/sys/kern/uipc_domain.c > head/sys/kern/uipc_socket.c >=20 > Modified: head/sys/kern/uipc_domain.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/kern/uipc_domain.c Fri Oct 19 10:07:55 2012 (r241725) > +++ head/sys/kern/uipc_domain.c Fri Oct 19 10:15:32 2012 (r241726) > @@ -239,28 +239,11 @@ domain_add(void *data) > mtx_unlock(&dom_mtx); > } > =20 > -static void > -socket_zone_change(void *tag) > -{ > - > - uma_zone_set_max(socket_zone, maxsockets); > -} > - > /* ARGSUSED*/ > static void > domaininit(void *dummy) > { > =20 > - /* > - * Before we do any setup, make sure to initialize the > - * zone allocator we get struct sockets from. > - */ > - socket_zone =3D uma_zcreate("socket", sizeof(struct socket), NULL, NULL, > - NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); > - uma_zone_set_max(socket_zone, maxsockets); > - EVENTHANDLER_REGISTER(maxsockets_change, socket_zone_change, NULL, > - EVENTHANDLER_PRI_FIRST); > - > if (max_linkhdr < 16) /* XXX */ > max_linkhdr =3D 16; > =20 >=20 > Modified: head/sys/kern/uipc_socket.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/kern/uipc_socket.c Fri Oct 19 10:07:55 2012 (r241725) > +++ head/sys/kern/uipc_socket.c Fri Oct 19 10:15:32 2012 (r241726) > @@ -227,6 +227,29 @@ MTX_SYSINIT(so_global_mtx, &so_global_mt > SYSCTL_NODE(_kern, KERN_IPC, ipc, CTLFLAG_RW, 0, "IPC"); > =20 > /* > + * Initialize the socket subsystem and set up the socket > + * memory allocator. > + */ > +static void > +socket_zone_change(void *tag) > +{ > + > + uma_zone_set_max(socket_zone, maxsockets); > +} > + > +static void > +socket_init(void *tag) > +{ > + > + socket_zone =3D uma_zcreate("socket", sizeof(struct socket), NUL= L, NULL, > + NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_NOFREE); > + uma_zone_set_max(socket_zone, maxsockets); > + EVENTHANDLER_REGISTER(maxsockets_change, socket_zone_change, NUL= L, > + EVENTHANDLER_PRI_FIRST); > +} > +SYSINIT(socket, SI_SUB_PROTO_DOMAININIT, SI_ORDER_ANY, socket_init, NULL= ); > + > +/* > * Sysctl to get and set the maximum global sockets limit. Notify proto= cols > * of the change so that they can update their dependent limits as requi= red. > */ --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl --k+w/mQv8wyuph6w0 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlC3IjcACgkQForvXbEpPzTMXQCg0ZuntUfMPwvrM5HOHUtQwC0Z /5cAoNO6sxzK+qE7fy3mjTuvfxSaivrN =DdPA -----END PGP SIGNATURE----- --k+w/mQv8wyuph6w0--