Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:92776 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 52287 invoked from network); 26 Apr 2016 10:05:19 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Apr 2016 10:05:19 -0000 Authentication-Results: pb1.pair.com smtp.mail=pthreads@pthreads.org; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=pthreads@pthreads.org; sender-id=unknown Received-SPF: error (pb1.pair.com: domain pthreads.org from 209.85.161.172 cause and error) X-PHP-List-Original-Sender: pthreads@pthreads.org X-Host-Fingerprint: 209.85.161.172 mail-yw0-f172.google.com Received: from [209.85.161.172] ([209.85.161.172:34004] helo=mail-yw0-f172.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 41/DD-02401-E5D3F175 for ; Tue, 26 Apr 2016 06:05:19 -0400 Received: by mail-yw0-f172.google.com with SMTP id j74so8368851ywg.1 for ; Tue, 26 Apr 2016 03:05:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pthreads-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=AXEvuv3jBEC+jAuIrQtzjh9wb3697fimaSPXek+Vofk=; b=JM5j3jmj4evZ3il5ciZzpGh2H0mDmbkhkCcLWPKB4fZ2cTq2i9YZWet1G4OeHSBHcz FCtMCQgUJZCNSsacYVJAAmjw46XtA7Z/d2BBg53WhmKMxTRT4bM63MxsZdv45oyiiIYe 5p72beefE0nL+zh89vR1gp/+p2asvO2F/ugifqElgzpOQG2qx5RMKM2//GTCUzoRNVm1 /yF9rz8cnIShwrC7OzkoOOPLT3iX19y+FnXoya3EqxFg8wcdrkPRXRYQkpW3s8PA/24a f6bfUnvS52Fuar51L6ABji/QA9aEVrC2hIXNOOzMv6BwZGH0KNLXe3DDLJkPKPMt15kP +fmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=AXEvuv3jBEC+jAuIrQtzjh9wb3697fimaSPXek+Vofk=; b=SKnK+SNGWacqWW74jTYGTBa2qKeIleipEHefAgxAtyl6tyqfSJmJe3OhXi5+xWM3XL Uo7IaNvcW4YJTzbT2KFgaAYK4dkTieuoiga3D5M09XsrkCNZEwpzVBR7ga7YEtG0yaz/ n5qHOY1x1Eo1P2ToM51/iz+7fjru26FJoHXq0vQ/DV2c3ekRa0tzAJRXS2Y2GVEFk/7h 33padme+coSMvYj5AexSDdHJDysaCE0on+9GC7+ekwp4fijlo6y05KfHqIE+OC/OAZOy nyp3XKw1vjHl3vtBPMH9EK8uIg/GXDY8xyXIEH8u1OJm+mylicSnxG5QWNR912DOkZQM zbdw== X-Gm-Message-State: AOPr4FXEWf7n2Qag7WJhYqJ1Hx4dvbvCSQTCvDQvxKZFzxmf/GVL/fm9EZZs/Lk/NKPTBp39Bb10bOMQLXFZ4Q== MIME-Version: 1.0 X-Received: by 10.13.225.149 with SMTP id k143mr748816ywe.256.1461665116277; Tue, 26 Apr 2016 03:05:16 -0700 (PDT) Received: by 10.129.109.67 with HTTP; Tue, 26 Apr 2016 03:05:16 -0700 (PDT) X-Originating-IP: [165.120.174.34] In-Reply-To: References: <59412f65-4d7d-bcd3-6c9b-400dbbb07cdc@fedoraproject.org> Date: Tue, 26 Apr 2016 11:05:16 +0100 Message-ID: To: Yasuo Ohgaki Cc: "internals@lists.php.net" Content-Type: multipart/alternative; boundary=94eb2c0775bc097fb70531606e21 Subject: Re: [PHP-DEV] Opcache::get($key), set($key, $value) to shared memory, is planned in PHP 7.1? From: pthreads@pthreads.org (Joe Watkins) --94eb2c0775bc097fb70531606e21 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Morning Yasuo, > Mm save handler does not compile with ZTS currently. libmm is not intended for use in multi-threaded environments ... mostly because threads don't need to map memory to share, they are already in the same address space. Another problem is processing models. PHP in NTS mode is highly likely to be deployed in some prefork multi processing model, this is a suitable environment for sharing with mapped memory. In ZTS mode, multi processing models are different, they are not always prefork, and so it's not always possible to share memory, nor is it always possible to create the right kind of synchronization primitives, some systems just lack that ability. There's probably not much point in trying to do anything about the mm handler, I doubt it is really used that much ... Cheers Joe On Tue, Apr 26, 2016 at 10:38 AM, Yasuo Ohgaki wrote: > Hi all, > > On Tue, Apr 26, 2016 at 4:44 PM, Remi Collet > wrote: > > Le 25/04/2016 =C3=A0 16:09, S.A.N a =C3=A9crit : > >> In userland lacks the ability to store data in the shared memory > >> modules, do not use pecl modules, it would be very nice to have a > >> function: > >> > >> opcache_get($key); > >> opcache_set($key, $value); > > > > Opcache is an opcode cache. > > > > A user data cache is something really different. > > > > We learn from the past, having both in the same extension (APC) was an > > mistake. > > > > So I really think, this doesn't have to be added in opache. > > > > And various extensions already exist (apcu, yac, memcache(d), redis...) > > each for different needs. > > They are different thing. That said > > Are we going to have race condition free shared memory API by default? > > If yes, I'll use it for mm save handler (session save handler that > uses shared memory) storage. Mm save handler does not compile with ZTS > currently. Mm save handler would be nice for small web sites. It could > be default save handler and many apps/sites will have performance > boost. > > Regards, > > -- > Yasuo Ohgaki > yohgaki@ohgaki.net > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > --94eb2c0775bc097fb70531606e21--