From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: poffice@blade.nagaokaut.ac.jp Delivered-To: poffice@blade.nagaokaut.ac.jp Received: from kankan.nagaokaut.ac.jp (kankan.nagaokaut.ac.jp [133.44.2.24]) by blade.nagaokaut.ac.jp (Postfix) with ESMTP id 1200E19C0004 for ; Thu, 3 Dec 2015 11:43:14 +0900 (JST) Received: from voscc.nagaokaut.ac.jp (voscc.nagaokaut.ac.jp [133.44.1.100]) by kankan.nagaokaut.ac.jp (Postfix) with ESMTP id ED055B5D864 for ; Thu, 3 Dec 2015 12:14:39 +0900 (JST) Received: from neon.ruby-lang.org (neon.ruby-lang.org [221.186.184.75]) by voscc.nagaokaut.ac.jp (Postfix) with ESMTP id 3E4FD18CC7D0 for ; Thu, 3 Dec 2015 12:14:40 +0900 (JST) Received: from [221.186.184.76] (localhost [IPv6:::1]) by neon.ruby-lang.org (Postfix) with ESMTP id 26B9812048F; Thu, 3 Dec 2015 12:14:38 +0900 (JST) X-Original-To: ruby-core@ruby-lang.org Delivered-To: ruby-core@ruby-lang.org Received: from o2.heroku.sendgrid.net (o2.heroku.sendgrid.net [67.228.50.55]) by neon.ruby-lang.org (Postfix) with ESMTPS id A0332120479 for ; Thu, 3 Dec 2015 12:14:34 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.me; h=from:to:references:subject:mime-version:content-type:content-transfer-encoding:list-id; s=smtpapi; bh=K9RePpFYBlwmKoPGeS2lEOZwUAU=; b=a0VpedYLjBfn3CLITL 5ZQ9PLT/gQarZi8CcLkUYLs+XLWepwQSyKRyt6Oc3tKVnyOTM76LNmztEVIWHYH4 oQkjPWVltb2wFxoz5kaf5P7MT+2ie/3SOUMb7noidWmdZ9JVp7nc3t3NLWFtxAvM Yj6lChiFqmgQb+PRRQYY7sLns= Received: by filter0487p1mdw1.sendgrid.net with SMTP id filter0487p1mdw1.7432.565FB39222 2015-12-03 03:14:26.504467053 +0000 UTC Received: from herokuapp.com (ec2-54-242-11-132.compute-1.amazonaws.com [54.242.11.132]) by ismtpd0006p1iad1.sendgrid.net (SG) with ESMTP id 8Mi9tvKfTH6lb0QZ77ihGw Thu, 03 Dec 2015 03:14:26.626 +0000 (UTC) Date: Thu, 03 Dec 2015 03:14:26 +0000 From: ngotogenome@gmail.com To: ruby-core@ruby-lang.org Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Redmine-MailingListIntegration-Message-Ids: 46496 X-Redmine-Project: ruby-trunk X-Redmine-Issue-Id: 11607 X-Redmine-Issue-Author: normalperson X-Redmine-Issue-Assignee: tenderlovemaking X-Redmine-Sender: ngoto X-Mailer: Redmine X-Redmine-Host: bugs.ruby-lang.org X-Redmine-Site: Ruby Issue Tracking System X-Auto-Response-Suppress: All Auto-Submitted: auto-generated X-SG-EID: ync6xU2WACa70kv/Ymy4QrNMhiuLXJG8OTL2vJD1yS78tx5LLhvSssQUvpzH5JSBz8vCjy/PLuMIc3 eigOEfMzn5WVVcWAAslc9e2niPMxqe0vbV7jcBKFL35lPix+wGRG0ss+u2y2ryggxnDTf8tNP6lHME VCqqfDY31e0rt71Ezjroy+S0/rFi50XxC8K3 X-SendGrid-Contentd-ID: {"test_id":"1449112470"} X-ML-Name: ruby-core X-Mail-Count: 71808 Subject: [ruby-core:71808] [Ruby trunk - Feature #11607] [PATCH] fiddle: release GVL for ffi_call X-BeenThere: ruby-core@ruby-lang.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Ruby developers List-Id: Ruby developers List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: ruby-core-bounces@ruby-lang.org Sender: "ruby-core" Issue #11607 has been updated by Naohisa Goto. After r52723, SEGV occurred during Fiddle::TestFunc#test_qsort1 test/fiddle/test_func.rb:83 on Solaris 10 i386 on RubyCI. (r52725) http://rubyci.s3.amazonaws.com/unstable10x/ruby-trunk/log/20151123T224815Z.fail.html.gz Because this occurred in the CI environment, no other detailed information was available. This is not reproduced on sparc Solaris. ---------------------------------------- Feature #11607: [PATCH] fiddle: release GVL for ffi_call https://bugs.ruby-lang.org/issues/11607#change-55213 * Author: Eric Wong * Status: Closed * Priority: Normal * Assignee: Aaron Patterson ---------------------------------------- Some external functions I wish to call may take a long time and unnecessarily block other threads. This may lead to performance regressions for fast functions as releasing/acquiring the GVL is not cheap, but can improve performance for long-running functions in multi-threaded applications. This also means we must reacquire the GVL when calling Ruby-defined callbacks for Fiddle::Closure, meaning we must detect whether the current thread has the GVL by exporting ruby_thread_has_gvl_p in internal.h ---Files-------------------------------- 0001-fiddle-release-GVL-for-ffi_call.patch (11.3 KB) fiddle-release-GVL-for-ffi_call-v2.patch (11.2 KB) -- https://bugs.ruby-lang.org/