From owner-svn-src-stable@FreeBSD.ORG Tue May 15 20:38:46 2012 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A8821065673; Tue, 15 May 2012 20:38:46 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 1A4D38FC0C; Tue, 15 May 2012 20:38:45 +0000 (UTC) Received: from skuns.kiev.zoral.com.ua (localhost [127.0.0.1]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id q4FKcWVF075839; Tue, 15 May 2012 23:38:32 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5) with ESMTP id q4FKcW8T038632; Tue, 15 May 2012 23:38:32 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.5/8.14.5/Submit) id q4FKcWkM038631; Tue, 15 May 2012 23:38:32 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 15 May 2012 23:38:32 +0300 From: Konstantin Belousov To: Andriy Gapon Message-ID: <20120515203832.GE2358@deviant.kiev.zoral.com.ua> References: <201205151721.q4FHLlgq097452@svn.freebsd.org> <20120515182747.GD2358@deviant.kiev.zoral.com.ua> <4FB2B7C5.2080604@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="r7U+bLA8boMOj+mD" Content-Disposition: inline In-Reply-To: <4FB2B7C5.2080604@FreeBSD.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.0 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-9@freebsd.org Subject: Re: svn commit: r235480 - in stable/9/sys: dev/usb geom geom/mountver i386/conf kern sys X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 May 2012 20:38:46 -0000 --r7U+bLA8boMOj+mD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 15, 2012 at 11:08:37PM +0300, Andriy Gapon wrote: > on 15/05/2012 21:27 Konstantin Belousov said the following: > > On Tue, May 15, 2012 at 05:21:47PM +0000, Andriy Gapon wrote: > >> Author: avg Date: Tue May 15 17:21:46 2012 New Revision: 235480 URL: > >> http://svn.freebsd.org/changeset/base/235480 > >>=20 > >> Log: MFC r230643: stop_scheduler -> td_stopsched Modified: > >> stable/9/sys/sys/proc.h=20 > >> =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 > >> > >>=20 > --- stable/9/sys/sys/proc.h Tue May 15 17:11:00 2012 (r235479) > >> +++ stable/9/sys/sys/proc.h Tue May 15 17:21:46 2012 (r235480) @@ -235= ,6 > >> +235,7 @@ struct thread { short td_locks; /* (k) Count of non-spin > >> locks. */ short td_rw_rlocks; /* (k) Count of rwlock read locks. */= =20 > >> short td_lk_slocks; /* (k) Count of lockmgr shared locks. */ + short > >> td_stopsched; /* (k) Scheduler stopped. */ struct turnstile *td_blocke= d; > >> /* (t) Lock thread is blocked on. */ const char *td_lockname; /* (t) N= ame > >> of lock blocked on. */ LIST_HEAD(, turnstile) td_contested; /* (q) > >> Contested locks. */ > >>=20 > > Did you verified that there is a gap between td_lk_slocks and td_blocke= d an > > all tier-1 architectures large enough to adopt td_stopsched without=20 > > changing the layout of struct thread after the new member ? >=20 > I haven't verified that. but I presumed that the gap was either 2 bytes on > 32-bit architectures or 6 bytes on 64-bit ones. > What is the proper and doable way of verifying this? I think that p sizeof(struct thread) from gdb on previous and current version of the kernel would be a good indicator. If sizes differ, it is bad. To be completely sure, calculate offset of the next member in the structure: in gdb, p &(((struct thread *)0)->td_blocked) for previous and current kernels. >=20 > > If not, this breaks KBI. >=20 > I can just revert the commit to not risk an obscure breakage. > What would you suggest? Move the new member to the end of the struct thread, and do explicit zeroing on the thread allocation, if commit changed the layout. >=20 > Thank you for spotting this. > --=20 > Andriy Gapon --r7U+bLA8boMOj+mD Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (FreeBSD) iEYEARECAAYFAk+yvsgACgkQC3+MBN1Mb4iMlwCeLxPP12Ha0t2J92rRBHKMLlNd bxkAoIpLVqddzFQZsD/Hpph/I6qZxwKy =NBWx -----END PGP SIGNATURE----- --r7U+bLA8boMOj+mD--