From owner-freebsd-sparc64@FreeBSD.ORG Fri May 20 12:41:10 2011 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C3BDA106566B; Fri, 20 May 2011 12:41:10 +0000 (UTC) (envelope-from peterjeremy@acm.org) Received: from mail35.syd.optusnet.com.au (mail35.syd.optusnet.com.au [211.29.133.51]) by mx1.freebsd.org (Postfix) with ESMTP id 577398FC22; Fri, 20 May 2011 12:41:09 +0000 (UTC) Received: from server.vk2pj.dyndns.org (c220-239-116-103.belrs4.nsw.optusnet.com.au [220.239.116.103]) by mail35.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id p4KCf31a001735 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 20 May 2011 22:41:04 +1000 X-Bogosity: Ham, spamicity=0.000000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.4/8.14.4) with ESMTP id p4KCf2Sa081058; Fri, 20 May 2011 22:41:02 +1000 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.4/8.14.4/Submit) id p4KCf2YQ081057; Fri, 20 May 2011 22:41:02 +1000 (EST) (envelope-from peter) Date: Fri, 20 May 2011 22:41:02 +1000 From: Peter Jeremy To: Marius Strobl Message-ID: <20110520124102.GA80878@server.vk2pj.dyndns.org> References: <20110519195245.GA3039@server.vk2pj.dyndns.org> <20110520103841.GA40497@alchemy.franken.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ZGiS0Q5IWpPtfppv" Content-Disposition: inline In-Reply-To: <20110520103841.GA40497@alchemy.franken.de> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.21 (2010-09-15) Cc: jeff@freebsd.org, freebsd-sparc64@freebsd.org Subject: Re: SCHED_ULE on sparc64 X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 May 2011 12:41:10 -0000 --ZGiS0Q5IWpPtfppv Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2011-May-20 12:38:41 +0200, Marius Strobl wr= ote: >The main problem with SCHED_ULE on sparc64 is that the MD code >(ab)uses the global sched_lock of SCHED_4BSD to protect pm_context, >pm_active and pc_pmap, partially of all CPUs, and SCHED_ULE doesn't >use/provide such a lock. One could replace the use of sched_lock >for that with a global MD spin lock but this has the issue that it >would have to be acquired and released in cpu_switch(), which is next >to impossible to do properly in assembler. Definitely messy but MIPS and PPC do it (at least the acquire - I don't see how the lock is released in either case). > There might be an alternate approach to >achieve the required level of protection not involving using a spin >lock but that needs thorough thinking and testing. The lack of atomic RMW operations definitely makes sparc messier than (eg) i386/amd64 here. It has been a long while since I studied SPARC assembler in any detail (and that was pre sun4u) so I can't really help here. > The bottom line >is that watching the various mailing lists so far didn't provide the >necessary motivation to work on that to me though (even today you still >find reports about performance problems with SCHED_ULE and suggestions >to use SCHED_4BSD instead, just see 4DD55CE0.50202@m5p.com as current >example). OTOH, not using it won't get the bugs fixed. My rationale for firing up the spare V890 at $work was to try and stress some of the big systems code and SCHED_ULE is supposed to be better at handling lots of CPUs than SCHED_4BSD. --=20 Peter Jeremy --ZGiS0Q5IWpPtfppv Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (FreeBSD) iEYEARECAAYFAk3WYV4ACgkQ/opHv/APuIdRZACgweqEKsrlN6bDMnxH8PLkN27l nscAmQH5Ob4hsMzt6QCnmVDaVuy9MAms =P6dO -----END PGP SIGNATURE----- --ZGiS0Q5IWpPtfppv--