From owner-freebsd-ppc@freebsd.org Wed May 6 17:02:23 2020 Return-Path: Delivered-To: freebsd-ppc@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7C1782DA2C5 for ; Wed, 6 May 2020 17:02:23 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-qt1-x844.google.com (mail-qt1-x844.google.com [IPv6:2607:f8b0:4864:20::844]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49HNDt5wVcz3QK8; Wed, 6 May 2020 17:02:22 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-qt1-x844.google.com with SMTP id i68so2012000qtb.5; Wed, 06 May 2020 10:02:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jQ5FWFcLzr5DqqP/gTSPBVyZUBwMEb1qNBBaEV/PybU=; b=KqpalwEjF08sy7pmNs9XkDB8TRuXQkVvVSW9/XjzaXMwxF/1DlulNRtpumKDfprxih q3ay2XTLVzFoIveKPg7U1rCiPkEttoHycTnU6erUnOXW15QUu+0O1Q2hd5CNDReiPXlk 7g+iVOg9lQ0HPNtCQE5zlTeLwjVK8i3zfot8Il4T0atsearp8e7e5o8lD1DEOEvwo0N2 KzwCWSoDT5nbZUqVIr83oM1uLlrx3+yypLoYbSISoFpPKaHkO/VFV1J7O8bT53BdOY7t LjGy6xkdnCRVEGyeaeweYty7uyHLJE6+ZUsrXgD1yotzlpqZJthh9ilejk1SjpJNkFYi 3YjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jQ5FWFcLzr5DqqP/gTSPBVyZUBwMEb1qNBBaEV/PybU=; b=D6UzitB6bKZYZ3HLSl75UbuE0b5KZxMikUaWy0wNKVx7dRqHuHeNtCH1rJLsY67nlj f9qiJhHvHzLGjE+Ai8obHnRkVdYH2OJzOedtjw3THkDqkCkrobab9YpD7SGCM7LQqjfb h97sn1U8MNdLaRIu4zLpvQM8IwfGAAdJ8tC3xaERswMcKT1nTtU/drLGJBQ6/hyLE/Zz r/c54Cgy5vm/jRJmAIBGEsEuiL/DVsbXkRTvRL1n6lykeFxzmgTpK5utOaBOPMd4btAR tEhmZ4bRf3yXNwe3uymitXUrqcuAB144D0ARvMD7OFIst4Dl+DiqxhgxS8oVpR7Y9TIz exQg== X-Gm-Message-State: AGi0PuZHqVJ7TLpy0esUCRdqsiezpCcnAKSlHxxWKc8BJI6DhhBtsUM5 fJWbtfrcCQGap29XaOm7y4cDzsqKUV0= X-Google-Smtp-Source: APiQypIySVC4zPnI1QWW9Zp9oc4y64GFoW0t8U2B4sK5dK9wTOsYRS4Neapz32Zym9ky6SJ9hFba5A== X-Received: by 2002:aed:2ac4:: with SMTP id t62mr9777681qtd.381.1588784541612; Wed, 06 May 2020 10:02:21 -0700 (PDT) Received: from titan.knownspace (173-19-125-130.client.mchsi.com. [173.19.125.130]) by smtp.gmail.com with ESMTPSA id j83sm2135462qke.7.2020.05.06.10.02.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 May 2020 10:02:21 -0700 (PDT) Date: Wed, 6 May 2020 12:02:15 -0500 From: Justin Hibbits To: "Brandon Bergren" Cc: "FreeBSD PowerPC ML" Subject: Re: svn commit: r360233 - in head: contrib/jemalloc . . . : This partially breaks a 2-socket 32-bit powerpc (old PowerMac G4) based on head -r360311 Message-ID: <20200506120215.2615b439@titan.knownspace> In-Reply-To: References: <1588493689.54538000.et1xl2l8@frv55.fwdcdn.com> <922FBA7C-039D-4852-AC8F-E85A221C2559@yahoo.com> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; powerpc64-portbld-freebsd13.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49HNDt5wVcz3QK8 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=KqpalwEj; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of chmeeedalf@gmail.com designates 2607:f8b0:4864:20::844 as permitted sender) smtp.mailfrom=chmeeedalf@gmail.com X-Spamd-Result: default: False [-3.00 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; RECEIVED_SPAMHAUS_PBL(0.00)[130.125.19.173.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; IP_SCORE_FREEMAIL(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[3]; IP_SCORE(0.00)[ip: (0.02), ipnet: 2607:f8b0::/32(-0.33), asn: 15169(-0.43), country: US(-0.05)]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[4.4.8.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_TLS_ALL(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com.dwl.dnswl.org : 127.0.5.0] X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 May 2020 17:02:23 -0000 On Sun, 03 May 2020 09:56:02 -0500 "Brandon Bergren" wrote: > On Sun, May 3, 2020, at 9:38 AM, Mark Millard via freebsd-ppc wrote: > > > > Observing and reporting the reverting result is an initial > > part of problem isolation. I made no request for FreeBSD > > to give up on using the updated jemalloc. (Unfortunately, > > I'm not sure what a good next step of problem isolation > > might be for the dual-socket PowerMac G4 context.) > > I appreciate this testing btw. The only dual-socket G4 I have (my > xserve g4) does not have the second socket populated, so I am > currently unable to test two-socket ppc32. > > > Other than reverting, no patch is known for the issue at > > this point. More problem isolation is needed first. > > > > While I do not have access, https://wiki.freebsd.org/powerpc > > lists more modern 32-bit powerpc hardware as supported: > > MPC85XX evaluation boards and AmigaOne A1222 (powerpcspe). > > (The AmigaOne A1222 seems to be dual-ore/single-socket.) > > jhibbits has an A1222 that is used as an actual primary desktop, and > I will hopefully have one at the end of the year. And I have an RB800 > that I use for testing. > > powerpcspe is really a different beast than aim32 though. I have been > mainly working on aim32 on g4 laptops, although I do have an xserve. > > > > > So folks with access to one of those may want to see > > if they also see the problem(s) with head -r360233 or > > later. > > Frankly, I wouldn't be surprised if this continues to be down to the > timebase skew somehow. I know that jemalloc tends to be sensitive to > time problems. > > > > > Another interesting context to test could be single-socket > > with just one core. (I might be able to do that on another > > old PowerMac, booting the same media after moving the > > media.) > > That's my primary aim32 testing platform. I have a stack of g4 > laptops that I test on, and a magically working usb stick (ADATA C008 > / 8GB model. For some reason it just works, I've never seen another > stick actually work) > > > > > If I understand right, the most common 32-bit powerpc > > tier 2 hardware platforms may still be old PowerMac's. > > They are considered supported and "mature", instead of > > just "stable". See https://wiki.freebsd.org/powerpc . > > However, the reality is that there are various problems > > for old PowerMacs (32-bit and 64-bit, at least when > > there is more than one socket present). The wiki page > > does not hint at such. (I'm not sure about > > single socket/multi-core PowerMacs: no access to > > such.) > > Yes, neither I nor jhibbits have multiple socket g4 hardware at the > moment, and I additionally don't have multiple socket g5 either. > > > > > It is certainly possible for some problem to happen > > that would lead to dropping the supported-status > > for some or all old 32-bit PowerMacs, even as tier 2. > > But that has not happened yet and I'd have no say in > > such a choice. > > From a kernel standpoint, I for one have no intention of dropping 32 > bit support in the forseeable future. I've actually been putting more > work into 32 bit than 64 bit recently in fact. > I currently have FreeBSD HEAD from late last week running on a dual G4 MDD (WITNESS kernel), and no segmentation faults from dhclient. I'm using the following patch against jemalloc. Brandon has reported other results with that patch to me, so I'm not sure it's a correct patch. - Justin diff --git a/contrib/jemalloc/include/jemalloc/internal/cache_bin.h b/contrib/jemalloc/include/jemalloc/internal/cache_bin.h index d14556a3da8..728959a448e 100644 --- a/contrib/jemalloc/include/jemalloc/internal/cache_bin.h +++ b/contrib/jemalloc/include/jemalloc/internal/cache_bin.h @@ -88,7 +88,7 @@ JEMALLOC_ALWAYS_INLINE void * cache_bin_alloc_easy(cache_bin_t *bin, bool *success) { void *ret; - bin->ncached--; + cache_bin_sz_t cached = --bin->ncached; /* * Check for both bin->ncached == 0 and ncached < low_water @@ -111,7 +111,7 @@ cache_bin_alloc_easy(cache_bin_t *bin, bool *success) { * cacheline). */ *success = true; - ret = *(bin->avail - (bin->ncached + 1)); + ret = *(bin->avail - (cached + 1)); return ret; }