From: Carlo Arenas <email@example.com> To: Junio C Hamano <firstname.lastname@example.org> Cc: "René Scharfe" <email@example.com>, firstname.lastname@example.org, email@example.com, firstname.lastname@example.org, email@example.com, Johannes.Schindelin@gmx.de Subject: Re: [RFC PATCH v2] grep: allow for run time disabling of JIT in PCRE Date: Mon, 29 Jul 2019 17:49:35 -0700 [thread overview] Message-ID: <CAPUEspjo3Uo8KtSYQ=uh+_gPEjb+dBdSPgsEVE1j1bOMPF=0DA@mail.gmail.com> (raw) In-Reply-To: <firstname.lastname@example.org> On Mon, Jul 29, 2019 at 10:47 AM Junio C Hamano <email@example.com> wrote: > René Scharfe <firstname.lastname@example.org> writes: > >> +pcre.jit:: > >> + If set to false, disable JIT when using PCRE. Defaults to > >> + true. > >> + if set to -1 will try first to use JIT and fallback to the > >> + interpreter instead of returning an error. > > > > Why not implement only -1, without adding this config setting? > > ... nor command line option. If we have an auto-fallback, I would > think that makes the most sense. IIRC the first iteration with only > the configuration was really about working around the (non-working) > pcre-jit---if we can self-detect and skip a non-working case, that > would allow us to drop end-user facing knobs, which is ideal. because that was proposed earlier and wasn't accepted ;) the main pushback though I got was that doing the fallback would degrade performance and so it was suggested that keeping the error should be possible somehow (with the implication it will add yet another macro) since living without grep -P was a reasonable tradeoff at that time got punted, but the need to find a solution for this become more urgent once it was announced PCRE2 would be used also used outside -P > Thanks for a doze of sanity. Obviously I am biased, but I kind of like the knob as it allows the user more flexibility to tweak the internals of grep and because we had made those internals already visible (ex: not handling any library errors ourselves and just aborting with a pcre error), but without any flexibility to fix those problems themselves (unless they open the code and rebuild, in most cases) the comment from the user that reported a regression with GNU grep because of JIT stack size and that I quote below is representative of how that layering violation affect users, and while git users are more likely than grep users to do the code tweaking needed, they could use some help. "As using the JIT can not be turned off at runtime, nor can the stacksize be controlled without patching + recompiling, this breaks previously working expressions for me, so I consider this a new regression, introduced with b06f7a29a58bbdd5866afc1e92dba3fdc9e2ed59 . I tested that increasing the stack-size to 1 M fixes the problem for me. A better fix could maybe consist of a better error message, allowing stack-size control at runtime and / or making JIT optional at runtime." making JIT optional at runtime is therefore the title of this patch and as I mentioned in some other thread it might be even useful to us for our own tests. Carlo  https://email@example.com/  https://firstname.lastname@example.org/  https://public-inbox.org/git/CAPUEspjKxQFiRgmfb2SuR_xpVu4=MN66kGEeBK1pHdBgXQbv7Q@mail.gmail.com/  https://email@example.com/msg05762.html
next prev parent reply other threads:[~2019-07-30 0:49 UTC|newest] Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-07-28 23:54 [RFC PATCH] " Carlo Marcelo Arenas Belón 2019-07-29 0:09 ` Carlo Arenas 2019-07-29 4:57 ` Junio C Hamano 2019-07-29 5:29 ` Carlo Arenas 2019-07-29 8:55 ` Ævar Arnfjörð Bjarmason 2019-07-29 10:26 ` Carlo Arenas 2019-07-29 12:38 ` Ævar Arnfjörð Bjarmason 2019-07-30 13:01 ` Carlo Arenas 2019-07-29 10:59 ` [RFC PATCH v2] " Carlo Marcelo Arenas Belón 2019-07-29 11:33 ` Carlo Arenas 2019-07-29 15:11 ` René Scharfe 2019-07-29 17:47 ` Junio C Hamano 2019-07-30 0:49 ` Carlo Arenas [this message] 2019-07-30 17:55 ` René Scharfe 2019-07-31 12:36 ` Johannes Schindelin 2019-07-31 16:18 ` Junio C Hamano 2019-07-31 12:32 ` Johannes Schindelin 2019-07-31 14:57 ` Ævar Arnfjörð Bjarmason 2019-08-04 0:25 ` Carlo Arenas 2019-08-04 3:14 ` [RFC PATCH v3] grep: treat PCRE2 jit compilation memory error as non fatal Carlo Marcelo Arenas Belón 2019-08-04 7:43 ` Carlo Arenas 2019-08-05 20:16 ` Junio C Hamano 2019-07-31 12:24 ` [RFC PATCH] grep: allow for run time disabling of JIT in PCRE Johannes Schindelin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style List information: http://vger.kernel.org/majordomo-info.html * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to='CAPUEspjo3Uo8KtSYQ=uh+_gPEjb+dBdSPgsEVE1j1bOMPF=0DA@mail.gmail.com' \ --firstname.lastname@example.org \ --cc=Johannes.Schindelin@gmx.de \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --subject='Re: [RFC PATCH v2] grep: allow for run time disabling of JIT in PCRE' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Code repositories for project(s) associated with this inbox: https://80x24.org/mirrors/git.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).