From owner-freebsd-ppc@freebsd.org Mon Jan 27 13:50:03 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 582B11F6EF2 for ; Mon, 27 Jan 2020 13:50:03 +0000 (UTC) (envelope-from oggy@farscape.co.uk) Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) (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 485rj61mgKz4P9C for ; Mon, 27 Jan 2020 13:50:01 +0000 (UTC) (envelope-from oggy@farscape.co.uk) Received: by mail-lj1-x232.google.com with SMTP id x14so8367817ljd.13 for ; Mon, 27 Jan 2020 05:50:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=farscape-co-uk.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FB80huagJ7HdcK/GnfYpZzC0bj/jBjJk1ZYiWHpM2Sc=; b=WA3r69i2qzVJMbcI2KT8blZeRPQfAZWIAwqI4eiJlyL2m6Zc0pxzxHXjtH3NvC5Dg3 sMdi7iOVqi0X06EQ5gsVnWXjPWIsrp0SDRsv620TKaaMDhshXBfEFNcolkQeFUNFvq8D nLPc4TO7ERrl5+3keo9PAhTE9JyjJLiaFgbPfAYMa94oznnJyEDxsG5SX/4VngUibuR0 OLgpPKf6N3YZuCwEmiDB62Z/Tp7VOU+3OaA4UZljL/CUxHmX7J7B36kt76/Cq8n3zLEG vBOTDL6TAaXqLFjgm75oWJqbuJPBak9CheJvgm626+7/vMA0F6hjbiFZfuD8+YvU1Jcu UYoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FB80huagJ7HdcK/GnfYpZzC0bj/jBjJk1ZYiWHpM2Sc=; b=b+USNf4XTD25REFnm51VhCe1/C3sPdHIMpBUOoeFMkdKYOGIeI3KUqTZOua3avyOv5 ghJ7MijeTmmhtv2CkLD3WxNU07ZZ0tj3QTm7yanbLa7B9dEHyZwRtrkq4PxSKlyCWthK Ruzz/FvQ2SP2+rmhMq8pgsfp1Ywqu/wFEQPD73aA2Th1wuxiN/UQONiBkEHEOhua3TfC bbsgTE6lAlShNCPcjVvXpDfv86UiKMOiawOC5AMGAtFAS9H+kv4XMGfx+ooftNLkgYI/ 23p5uoXaMkdsblhnnBfL8XxzzZNgtbRKpb2rcTQLnuBFCkzLoe1MtgQlzWPQ3QtFPoI7 iPJg== X-Gm-Message-State: APjAAAVJVBoraOAl5cqqiKseEHsFaCKdmMjXKDK5Ag6JpN8d2wGlC9zQ J0XFi7phY2l4Tk/PMSruElo+583Z76w4OGU3elMrtvukDNy7sg== X-Google-Smtp-Source: APXvYqyNfs3Vt5AqJUTSisLDoy76UMug7LRQ3weZMGIV3q10E3HpE0ebRXJSbp9Bhmdz62B2CF1gfxby/iZVBbNuva0= X-Received: by 2002:a05:651c:1072:: with SMTP id y18mr1749483ljm.243.1580132998939; Mon, 27 Jan 2020 05:49:58 -0800 (PST) MIME-Version: 1.0 References: <1EDABAB4-87F5-4C8E-A7B9-9143D520BDE0.ref@yahoo.com> <1EDABAB4-87F5-4C8E-A7B9-9143D520BDE0@yahoo.com> In-Reply-To: <1EDABAB4-87F5-4C8E-A7B9-9143D520BDE0@yahoo.com> From: Francis Little Date: Mon, 27 Jan 2020 13:49:48 +0000 Message-ID: Subject: Re: I have submitted https://reviews.freebsd.org/D23376 for avoiding the PowerMac threads-stuck-sleeping issue To: Mark Millard Cc: FreeBSD PowerPC ML X-Rspamd-Queue-Id: 485rj61mgKz4P9C X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=farscape-co-uk.20150623.gappssmtp.com header.s=20150623 header.b=WA3r69i2; dmarc=none; spf=pass (mx1.freebsd.org: domain of oggy@farscape.co.uk designates 2a00:1450:4864:20::232 as permitted sender) smtp.mailfrom=oggy@farscape.co.uk X-Spamd-Result: default: False [-4.22 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[farscape-co-uk.20150623.gappssmtp.com:s=20150623]; URL_IN_SUBJECT(1.00)[reviews.freebsd.org]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-ppc@freebsd.org]; DMARC_NA(0.00)[farscape.co.uk]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[farscape-co-uk.20150623.gappssmtp.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[2.3.2.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.5.4.1.0.0.a.2.list.dnswl.org : 127.0.5.0]; FREEMAIL_TO(0.00)[yahoo.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; IP_SCORE(-2.72)[ip: (-9.24), ipnet: 2a00:1450::/32(-2.53), asn: 15169(-1.78), country: US(-0.05)]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jan 2020 13:50:03 -0000 Building Kernel with this patch applied, running without SMP currently - so will take a while! Will re-enable SMP and report back after it's built. (Resend, forgot to CC the list!) Regards On Sun, 26 Jan 2020 at 23:28, Mark Millard via freebsd-ppc < freebsd-ppc@freebsd.org> wrote: > I've described my first ever reviews.freebsd.org/D????? > submittal with: > > QUOTE > REVISION SUMMARY > Explicitly initialize the bsp's TB value early on. For PowerMacs with > multiple sockets or cores only, have machdep_ap_bootstrap for each ap make > a round trip with the bsp to get a current bsp's TB value and then shift > the ap's time so that the midpoint of the shifted round tip interval > approximately matches the TB value the bsp supplied. The round trips and > data transfers use a memory protocol. > > For non-PowerMacs, do the old way for the ap's. > > TEST PLAN > I've been running based on the patches being invovled since late 2019-May > or so: PowerMac11,2 with 2 sockets, 2 cores each, and PowerMac3,6 with 2 > sockets, 1 core each. No examples of 1 socket with 2 cores, unfortunately. > No examples of powerpc64 or powerpc non-PowerMacs either. I do use the same > source tree to build for amd64, aarch64, and armv7 and they have been > working too. But the patch material is extracted from a source tree that > has more local changes: the testing has not been with only these changes. > > I've not had any examples of the stuck-sleeping issue since adopting > these changes. Nor have I had new problems from the changes. > END QUOTE > > > A summary of my changes is: > > > Part 0: > Avoid interrupts messing up mttb use: > > sys/powerpc/include/cpufunc.h > > > Part 1: > Enable the "alternate_timebase_sync_style" indicator > only for PowerMacs: > > sys/powerpc/powermac/platform_powermac.c > > > Part 2: > The code supporting machdep_ap_bootstrap's part of the > hard work, including the changes to machdep_ap_bootstrap: > > sys/powerpc/powerpc/mp_machdep.c > > > Part 3: > Making sure that the bsp follows the rule: > "The TB is a volatile resource and must be initialized during reset." > > sys/powerpc/powerpc/machdep.c > > > > > I'll note that I'm not style(9) literate/familiar and at the time > my capacity went to investigating the problem and potential solutions, > not to style(9). So, once a technique is classified as okay, how > it is written in the source would need its own round of work, > presuming my submittal does not inspire a separate fix by someone. > > === > Mark Millard > marklmi at yahoo.com > ( dsl-only.net went > away in early 2018-Mar) > > _______________________________________________ > freebsd-ppc@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-ppc > To unsubscribe, send any mail to "freebsd-ppc-unsubscribe@freebsd.org" >