Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:109961 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 63381 invoked from network); 2 May 2020 09:52:19 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 2 May 2020 09:52:19 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id EA2591804B4 for ; Sat, 2 May 2020 01:26:24 -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,DKIM_SIGNED, DKIM_VALID,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Sat, 2 May 2020 01:26:23 -0700 (PDT) Received: by mail-wr1-f43.google.com with SMTP id g13so14543871wrb.8 for ; Sat, 02 May 2020 01:26:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=beberlei-de.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=xL8SrOUOM4kleMktToX5PR51ioXDMGQI2OJemaummV4=; b=g/W4WIs4roISbETDPIWcZ+0uxmJ3N+LVVNgYOpOnO56D+JQQWYL5Qlxm7/YX8cmfjn 6p+Gd8MY2kKxvcfI9XJa3SVw+w62ZlL1tdfVX6fpivuWyX49ATzaZz8JGkV87TXvKled bx0TPH1ibv0ilo2qj1ty7pKkmRZ5qqLyhfOP86YQbwqfbAeiNUb5873wao3V45tsSU9M KXw19Eg/f1rqaXkpL42EqD8CFBZR9YA9L5HF6hH7KrPwmwy5R5H9MzP82Mfl9HRnLYbY 6lCOUixLt2eHbBIwwYZyMzSx05l8lQuVtfgQs0+MvJVI/hhFJ2kiEJ/zNuiaO/z7BVAn 7vDw== 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; bh=xL8SrOUOM4kleMktToX5PR51ioXDMGQI2OJemaummV4=; b=HW8wz5MkVD+ooytCQZTbRi15GqggjWhuxjJu7wYLc1bIALE2ZpW5cPeyDqXxIzyxKe djojwGYG24qG/iKcZAiGWEJRTfo4OumvZhuptBU6gpl9lmsb59WsQ7uq1TUSmoTrRfcq rw7IbcFLoQ+4bhgwJEAzj8TB5DLjW6XNXWJHXjKTQgOQP5q8Nw/ACigXogOUZw7ploi5 ny05siniCaFmTRz1ar/TyiJDvv7jOoTaqfAqLf0wnIj5U3TyV5nrd1Cr/tScpecyjF+6 7Qb6oJPD2wUei8MqsbDiVZDTeXlRgjA8/HGRmJkEMx8XJL6SZdrOcbFZiWjMQ+/Suc8u ZH/Q== X-Gm-Message-State: AGi0PuZFTKrSjNdMRdxfVBK/AcfWMY/pt3CqWpgO30zVTEwPzLSHcTrM y7Om+LryqIXv5Y6dvUk2u05FQhbQdrePB1D3pHe5uJTC49o= X-Google-Smtp-Source: APiQypINg2qElzaf7QOFiOJkjV4FrSLCLmx97VkPeoOE88fQBx50a6B+k65aUFonredALc1cI+Wgmb/J+evhQBDSAXA= X-Received: by 2002:adf:f5ce:: with SMTP id k14mr8958070wrp.39.1588407981417; Sat, 02 May 2020 01:26:21 -0700 (PDT) MIME-Version: 1.0 References: <0ddd2987-644b-6fec-2670-2b6f366290e2@php.net> In-Reply-To: <0ddd2987-644b-6fec-2670-2b6f366290e2@php.net> Date: Sat, 2 May 2020 10:26:09 +0200 Message-ID: To: PHP Internals Content-Type: multipart/alternative; boundary="0000000000007db97005a4a60df5" Subject: Re: [PHP-DEV] opcache.jit directive should be split up From: kontakt@beberlei.de (Benjamin Eberlei) --0000000000007db97005a4a60df5 Content-Type: text/plain; charset="UTF-8" On Tue, Apr 14, 2020 at 3:53 PM Sebastian Bergmann wrote: > PHP 8's JIT is currently mainly controlled through the opcache.jit > configuration directive [1]. > > The value for opcache.jit is currently a sequence of four digits, "5021" > for instance. This would activate JIT optimizations based on static type > inference and inner procedure analyses (Optimization Level), JIT > optimization of all functions on load of the respective sourcecode file > (Trigger), global linear-scan register allocator (Register Allocation), > and AVX instruction generation (CPU-Specific Optimization Flags). > > I think that using a single configuration directive for these four > distinct aspects of just-in-compilation is a bad idea. Many will, at least > at first glance, mistake the value for a bitmask. > > 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 > > What do you think? > I have made a PR for this and added two follow up discussion points: https://github.com/php/php-src/pull/5510 - 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). - The default for opcache.jit_trigger should be changed to 3 (profile and jit hot functions only). This is suggested in the RFC as well. Both changes would require tests to change, and changes to the CI setup to make sure the build running with JIT enabled still works. > -- > [1] https://wiki.php.net/rfc/jit#phpini_defaults > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --0000000000007db97005a4a60df5--