From owner-freebsd-ppc@freebsd.org Mon Nov 26 19:41:33 2018 Return-Path: Delivered-To: freebsd-ppc@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7B5311426A3 for ; Mon, 26 Nov 2018 19:41:32 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic312-22.consmr.mail.ne1.yahoo.com (sonic312-22.consmr.mail.ne1.yahoo.com [66.163.191.203]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B085B85DFF for ; Mon, 26 Nov 2018 19:41:31 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-YMail-OSG: jVyIxPQVM1kwYoo.ZlLbI60q51W4xfZ_La3X5bgG2oL2bO625S83LVdk.R08MDQ 6JyhSp2Uf1vyxyxh0SsCz1QAF1FytpC_xeGdxoWpBILJ8JoLwPvpAnCzh_MmyuNx0MS5xI_LU0Kq IDk2Q58XdF97Cd_d2Vrl8qvKY8yBCgoao.DZnr5OwdY_kvd37lkWMtPezud.zhy6oDUVguyWxJ3p _3dooZgSCJO26PmiLKBQ2u.sd7EgWqUV5GLuhi9qEb1GoE5FmZgy6A7IVTWxTh3cU67exPnkOMmW y1PiVzpz_MLX2qG4LfO56zfpCJwJvRBTRs7z5J1zqwOg38EDXrWB7lgnOYanqu.B7jFymXUUKNXU PFqIPz5qvlQfL675t8Eh0wbqkDK4saShQwASC1OtvpqLHJg6PeIIkdpfDhkqDu.KD_uKMzLZ3l0A KCwYIIs6spcVJVqTjZQaDrSuCcIvtYO7W3BpaImFsNI5Wuy04Nzrba9EdLpY_9EUOjJ7KH6zsoTS ab4.DS1kGA0OzCGpIpZknqtoaFXjvNKDiQyJQNSmEk38MwRNyijm5VkNzvPqDVU0QHKXyopTQwiS 8Vprit92zplIgukFgbty9eZ1VGTtsSVwEKwogCLSkjtpTdSwO0mzHsro8wL8.0UNiVoA8uUQr2FT wF9F5dg7c9uSVb8j2EuPMnecqlPd1s6jdV1WUSBfPCvt3c2.WISOjWsKT.FBBy2jRmcokn3jualj 0MSRp44GG.SGJzjnOOu..st9CBKcmL_x800UUnb6AMCgBoMXhr6ysV7LHILcz5H0w0Rey9z66uRn axeWuLka5i7SQiahvKDu1V_mbQ9yAq9xTed6e3BwtECyb05Kec2svDLvSgK0AHo3Xc.idcVJvf9i Te_Bogp80xXPj0ELV1NuVO8mAeRF1aXN6y1q79uGDHcxAz3j9Lm2S4wOTPtOXsHtanmN4fZfL_yk 1iFEfcaZmBDzzGxRHL9zDIORjFs8ZBMfS7dHDJxiydgKsflU5nH4yXEhTozQwlTiSyXrSaIPlmEW 9xmhaEUZXctPnp4h3iyjgyM8hbl0kgt7pOwttpVr7vj9tQJkTqfZBbC2i2ZUG Received: from sonic.gate.mail.ne1.yahoo.com by sonic312.consmr.mail.ne1.yahoo.com with HTTP; Mon, 26 Nov 2018 19:41:24 +0000 Received: from c-76-115-7-162.hsd1.or.comcast.net (EHLO [192.168.1.101]) ([76.115.7.162]) by smtp428.mail.ne1.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 2e4afecb4b78465fd534bb592d1485ca; Mon, 26 Nov 2018 19:41:20 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 12.1 \(3445.101.1\)) Subject: Re: RC2 seems to need kern.smp.disabled=1 From: Mark Millard In-Reply-To: <57efdab7-568c-623e-4b66-cf5ed7c138bf@blastwave.org> Date: Mon, 26 Nov 2018 11:41:18 -0800 Cc: FreeBSD PowerPC ML Content-Transfer-Encoding: quoted-printable Message-Id: <179CF982-D123-483D-B3B9-188010C39BD5@yahoo.com> References: <57efdab7-568c-623e-4b66-cf5ed7c138bf@blastwave.org> To: Dennis Clarke X-Mailer: Apple Mail (2.3445.101.1) X-Rspamd-Queue-Id: B085B85DFF X-Spamd-Result: default: False [3.77 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; FREEMAIL_FROM(0.00)[yahoo.com]; NEURAL_SPAM_MEDIUM(0.70)[0.696,0]; NEURAL_SPAM_SHORT(0.99)[0.989,0]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; MX_GOOD(-0.01)[cached: mta6.am0.yahoodns.net]; RCVD_IN_DNSWL_NONE(0.00)[203.191.163.66.list.dnswl.org : 127.0.5.0]; RCPT_COUNT_TWO(0.00)[2]; IP_SCORE(1.65)[ip: (5.58), ipnet: 66.163.184.0/21(1.52), asn: 36646(1.22), country: US(-0.09)]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36646, ipnet:66.163.184.0/21, country:US]; MID_RHS_MATCH_FROM(0.00)[]; NEURAL_SPAM_LONG(0.95)[0.950,0] X-Rspamd-Server: mx1.freebsd.org 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, 26 Nov 2018 19:41:33 -0000 On 2018-Nov-26, at 11:13, Dennis Clarke = wrote: > Hello ppc64 types: >=20 > Merely an observation that RC1 was running more or less fine without = the > need to castrate the smp feature whereas RC2 won't even boot. If you were able to smp boot a PowerMac G5 based on a version that was based on: #define VM_MAX_KERNEL_ADDRESS 0xe0000007ffffffffUL from sys/powerpc/include/vmparam.h that is interesting. This is the value I (and others?) have been reverting to: #define VM_MAX_KERNEL_ADDRESS 0xe0000001c7ffffffUL in order to allow smp use on such G5's. Quoting an old reply from 2018-Oct-11 (-r??????'s are from 13-CURRENT): QUOTE Until the problems with -r334498 's adjustment to VM_MAX_KERNEL_ADDRESS are dealt with, PowerMac G5's have boot problems (and possibly other problems), at least those with multiple sockets (for what I can test). (I've no access to other forms of PowerMac G5's.) See: https://lists.freebsd.org/pipermail/freebsd-ppc/2018-October/009669.html and later in that thread. (Earlier in the thread is likely a waste of = time to read, given what is now known.) My G5 contexts are operational by reverting -r334498 . The contexts are otherwise based on -r339076 currently. Note: My boot test on a 8 GiByte, dual-socket, one "CPU" per socket, PowerMac G5 met the conditions of Andreas Tobler's requested test conditions and the machine boot fine (VM_MAX_KERNEL_ADDRESS near the RAM size, on the low side). The G5 so-called "Quad Core"s, 4 cores total in each system but split evenly across 2 sockets in each), one with 12 GiByte and one with 16 GiByte of RAM, booted fine as well. But VM_MAX_KERNEL_ADDRESS was somewhat under 8GiByte and so not near those sizes. ENDQUOTE > The fans > just roar and it sits there roaring. So RC2 : >=20 > root@eris:~ # uname -a > FreeBSD eris 12.0-RC2 FreeBSD 12.0-RC2 r340839 GENERIC powerpc > root@eris:~ # getconf -a | grep -i "NPROC" > getconf: sysconf: _POSIX_FILE_LOCKING: Invalid argument > getconf: sysconf: _POSIX_THREAD_SPORADIC_SERVER: Invalid argument > getconf: sysconf: _POSIX_TRACE_EVENT_FILTER: Invalid argument > getconf: sysconf: _POSIX_TRACE_INHERIT: Invalid argument > getconf: sysconf: _POSIX_TRACE_LOG: Invalid argument > getconf: sysconf: _XOPEN_VERSION: Invalid argument > NPROCESSORS_CONF: 1 > NPROCESSORS_ONLN: 1 > root@eris:~ # >=20 > However the exact same machine was fine yesterday with RC1 : >=20 > eris$ /usr/bin/time -p ./factorial 20 > ------------------------------------------------------------- > system name =3D FreeBSD > node name =3D eris > release =3D 12.0-RC1 > version =3D FreeBSD 12.0-RC1 r340470 GENERIC > machine =3D powerpc > ------------------------------------------------------------- > GMP library version : 6.1.2 > inf : pagesize seems to be 4096 > inf : physical pages number seems to be 2085549 > inf : total memory seems to be 8542408704 > inf : number of configured processors seems to be 4 > inf : number of online processors seems to be 4 > ------------------------------------------------------------- >=20 > n approx time in nanosecs > ---------+---------------------------- > 10000 28782119 nsec > 20000 113344390 nsec > 30000 264088884 nsec > 40000 482695132 nsec > 50000 772446957 nsec > 60000 1130731802 nsec > 70000 1564791040 nsec > 80000 2069463850 nsec > 90000 2649433561 nsec > 100000 3302860225 nsec > 110000 4031924958 nsec > 120000 4841946952 nsec > 130000 5725338148 nsec > 140000 6684564457 nsec > 150000 7726752108 nsec > 160000 8842535135 nsec > 170000 10032317230 nsec > 180000 11316147413 nsec > 190000 12666156577 nsec > 200000 14101113493 nsec > -------------------------------------- > real 98.35 > user 98.23 > sys 0.02 >=20 >=20 > Would love to see what anyone else gets from that same code. Also = what the heck is this double underscore "__BSD_VISIBLE" requirement in = order to get reasonable data from sysconf()? >=20 >=20 > /********************************************************************* > * The Open Group Base Specifications Issue 6 > * IEEE Std 1003.1, 2004 Edition > * > * An XSI-conforming application should ensure that the feature > * test macro _XOPEN_SOURCE is defined with the value 600 before > * inclusion of any header. This is needed to enable the > * functionality described in The _POSIX_C_SOURCE Feature Test > * Macro and in addition to enable the XSI extension. > * > *********************************************************************/ > #define _XOPEN_SOURCE 600 > #define __BSD_VISIBLE 1 >=20 > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include > #include >=20 > #include "gmp.h" >=20 > uint64_t timediff( struct timespec start, struct timespec end ) > { > /* return the delta time as a 64-bit positive number of > * nanoseconds. Regardless of the time direction between > * start and end we always get a positive result. */ >=20 > struct timespec temp; > uint64_t s, n; >=20 > if ( ( end.tv_nsec - start.tv_nsec ) < 0 ) { > /* make a full second adjustment to tv_sec */ > temp.tv_sec =3D end.tv_sec - start.tv_sec - 1; > /* we have to add a full second to temp.tv_nsec */ > temp.tv_nsec =3D 1000000000 + end.tv_nsec - start.tv_nsec; > } else { > temp.tv_sec =3D end.tv_sec - start.tv_sec; > temp.tv_nsec =3D end.tv_nsec - start.tv_nsec; > } > s =3D (uint64_t) temp.tv_sec; > n =3D (uint64_t) temp.tv_nsec; > return ( s * (uint64_t)1000000000 + n ); > } >=20 > void gmp_fact( int n ) > { > int i; > mpz_t p; >=20 > mpz_init_set_ui( p, 1 ); /* p =3D 1 */ > for ( i =3D 1; i <=3D n ; ++i ) { > mpz_mul_ui( p, p, i ); /* p =3D p * i */ > } > /* will fail wonderfully if n is large */ > /****************************************************** > ***** actually lets not bother to print anything ***** > * fprintf ( stdout, "\n %d! =3D ", n ); > * mpz_out_str( stdout, 10, p ); > * fprintf ( stdout, "\n\n" ); > ******************************************************/ > mpz_clear( p ); >=20 > } >=20 > int main(int argc, char *argv[]) > { > int n, k, state; > long pagesize, phypages, nproc_onln, nproc_cfg; > struct timespec start, end; > struct utsname uname_data; > uint64_t t_delta; >=20 > if ( argc <=3D 1) { > usage: fprintf ( stderr, "Usage: %s \n", argv[0] ); > fprintf ( stderr, " : Where is a positive " ); > fprintf ( stderr, "integer for the number of loops to\n" ); > fprintf ( stderr, " : perform. In each loop a factorial" ); > fprintf ( stderr, " shall be computed which is a\n" ); > fprintf ( stderr, " : multiple of ten thousand.\n" ); > return ( EXIT_FAILURE ); > } else { > n =3D (int) strtol( argv[1], (char **)NULL, 10); > if ( n < 0 ) goto usage; > } >=20 > setlocale( LC_MESSAGES, "C" ); > if ( uname( &uname_data ) < 0 ) { > fprintf ( stderr, > "WARNING : Could not attain system uname data.\n" ); > perror ( "uname" ); > } else { > printf ( "-------------------------------" ); > printf ( "------------------------------\n" ); > printf ( " system name =3D %s\n", uname_data.sysname ); > printf ( " node name =3D %s\n", uname_data.nodename ); > printf ( " release =3D %s\n", uname_data.release ); > printf ( " version =3D %s\n", uname_data.version ); > printf ( " machine =3D %s\n", uname_data.machine ); > printf ( "-------------------------------" ); > printf ( "------------------------------" ); > } > printf ("\n"); >=20 > printf("GMP library version : %d.%d.%d\n", > __GNU_MP_VERSION, > __GNU_MP_VERSION_MINOR, > __GNU_MP_VERSION_PATCHLEVEL ); >=20 > /* try to get an idea of system processors available and memory */ > state =3D 1; > pagesize =3D sysconf(_SC_PAGESIZE); > if (pagesize =3D=3D -1){ > fprintf(stderr, > "dbg : could not attain _SC_PAGESIZE\n : %s\n", > strerror(errno)); > state =3D 0; > }else{ > printf("inf : pagesize seems to be %i\n", pagesize); > } > phypages =3D sysconf(_SC_PHYS_PAGES); > if (phypages =3D=3D -1){ > fprintf(stderr, > "dbg : could not attain _SC_PHYS_PAGES\n : %s\n", > strerror(errno)); > state =3D 0; > }else{ > printf("inf : physical pages number seems to be %i\n", = phypages); > } > if(state){ > printf("inf : total memory seems to be %llu\n", > (uint64_t)pagesize * (uint64_t)phypages); > }else{ > fprintf(stderr,"dbg : there is no way to determine system = memory.\n"); > } >=20 > nproc_cfg =3D sysconf(_SC_NPROCESSORS_CONF); > if (nproc_cfg =3D=3D -1){ > fprintf(stderr, > "dbg : could not attain _SC_NPROCESSORS_CONF\n : = %s\n", > strerror(errno)); > }else{ > printf("inf : number of configured processors seems to be = %i\n", nproc_cfg); > } > nproc_onln =3D sysconf(_SC_NPROCESSORS_ONLN); > if (nproc_onln =3D=3D -1){ > fprintf(stderr, > "dbg : could not attain _SC_NPROCESSORS_ONLN\n : = %s\n", > strerror(errno)); > }else{ > printf("inf : number of online processors seems to be %i\n", = nproc_onln); > } >=20 > printf("-------------------------------"); > printf("------------------------------\n\n"); >=20 > printf(" n approx time in nanosecs\n"); > printf(" ---------+----------------------------\n"); >=20 > for ( k=3D0; k clock_gettime( CLOCK_MONOTONIC, &start ); > gmp_fact( (k+1) * 10000 ); > clock_gettime( CLOCK_MONOTONIC, &end ); >=20 > t_delta =3D timediff( start, end ); > fprintf ( stdout, " %6i %16lld nsec\n", > (k+1) * 10000, t_delta ); > } > printf ( " --------------------------------------\n" ); >=20 > return ( EXIT_SUCCESS ); > } >=20 > Anyways I am going to see if there is a way around this ugly > kern.smp.disabled requirement. Hope there is one. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)