Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:109970 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 57720 invoked from network); 2 May 2020 19:41:16 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 2 May 2020 19:41:16 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id E26C71804DD for ; Sat, 2 May 2020 11:15:25 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FROM_EXCESS_BASE64, RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS132203 203.205.194.0/23 X-Spam-Virus: No X-Envelope-From: Received: from smtpproxy21.qq.com (smtpbg702.qq.com [203.205.195.102]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sat, 2 May 2020 11:15:24 -0700 (PDT) X-QQ-mid:Yeas8t1588443315t644t48223 Received: from 4B562073492C4058817F84E016DE3445 (me@jhdxr.com [116.14.113.108]) X-QQ-SSF:00100000000000F0FG1000000000000 To: "'tyson andre'" , "'Benjamin Eberlei'" , "'PHP Internals'" References: <0ddd2987-644b-6fec-2670-2b6f366290e2@php.net>, In-Reply-To: Date: Sun, 3 May 2020 02:15:14 +0800 Message-ID: <000d01d620ad$a075e400$e161ac00$@jhdxr.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQJFskAqxwXhBybqpAJCsu+c94W6PQGJwfKiA2S6lAGnjoEnwA== Content-Language: zh-cn X-QQ-SENDSIZE: 520 Feedback-ID: Yeas:jhdxr.com:qybgforeign:qybgforeign6 X-QQ-Bgrelay: 1 Subject: RE: [PHP-DEV] opcache.jit directive should be split up From: me@jhdxr.com (=?utf-8?b?Q0hVIFpoYW93ZWk=?=) Hi Tyson, For `opcache.jit_optimization_level` I think we'd better remain these magic numbers, like what we did for `opcache.optimization_level`. I think this kind of setting requires professional knowledge in this domain, and it doesn't make much sense to change to the text-based Options. E.g. what does "minimal" mean in this context? Regards, CHU Zhaowei -----Original Message----- From: tyson andre Sent: Saturday, May 2, 2020 9:59 PM To: Benjamin Eberlei ; PHP Internals Subject: Re: [PHP-DEV] opcache.jit directive should be split up Hi Benjamin, > > I think it would be best to split up opcache.jit into five separate > > configuration directives and propose the following names: > > > > * opcache.jit for (de)activating JIT > > * opcache.jit_optimization_level for setting the optimization level > > * opcache.jit_trigger for configuring the JIT trigger > > * opcache.jit_register_allocation for configuring register > > allocation > > * opcache.jit_cpu_flags for configuring CPU-specific flags > > > > ... > > - We now have a bool opcache.jit and the "implicit" flag > opcache.jit_buffer_size which is 0 by default and leads to disabling > the JIT. Maybe we should turn these around and set opcache.jit=0 and > opcache.jit_buffer_size=16M (or whatever is a good default). I'd agree with that - I keep forgetting that `opcache.jit` isn't a boolean. To avoid confusion with the RFC and to be consistent with `opcache.enable` and `opcache.enable_cli`, I'd prefer `opcache.enable_jit={0,1}` over `opcache.jit`. Also, people who are reading a php.ini would not remember what `opcache.jit_optimization_level=1` means. Maybe supporting aliases for the 4 integer flags would be useful. (`opcache.jit_optimization_level={no,minimal,selective_inlining,jit_optimize _3,jit_optimize_4,jit_optimize_5|full}`) - I can't think of a good name for 3-5. Also, it's possible that even more aggressive settings may be added in the future. - Emit a startup error (or warn and use the default) if the alias or number is unrecognized. One possibility I thought of is to default the `jit_buffer_size` to a multiple of `opcache.memory_consumption`, which might be a reasonable default in most use cases. (Large codebases would get a large buffer, tiny scripts would get a small buffer). I'm not sure what that multiple should be or if there'd be a minimum that should be enforced. - If opcache.memory_consumption is somehow set to 0 or negative (file_cache_only?), maybe go with a default such as 16M. Thanks, - Tyson -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php