From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Concurrency, again Date: Fri, 28 Oct 2016 10:53:56 +0300 Message-ID: <83inscsycr.fsf@gnu.org> References: <87wq97i78i.fsf@earlgrey.lan> <86k2dk77w6.fsf@molnjunk.nocrew.org> <9D64B8EA-DB52-413D-AE6A-264416C391F3@iotcl.com> <83int1g0s5.fsf@gnu.org> <83twckekqq.fsf@gnu.org> <83funkwfzf.fsf@gnu.org> <87k2cwe4wl.fsf@jupiter.lan> <8360odu2gp.fsf@gnu.org> <87r3717brt.fsf@dustycloud.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1477641288 13923 195.159.176.226 (28 Oct 2016 07:54:48 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 28 Oct 2016 07:54:48 +0000 (UTC) Cc: p.stephani2@gmail.com, dancol@dancol.org, stefan.huchler@mail.de, emacs-devel@gnu.org To: Christopher Allan Webber Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 28 09:54:43 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c01zm-0001tD-2l for ged-emacs-devel@m.gmane.org; Fri, 28 Oct 2016 09:54:34 +0200 Original-Received: from localhost ([::1]:47304 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c01zo-0003qw-Nl for ged-emacs-devel@m.gmane.org; Fri, 28 Oct 2016 03:54:36 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53490) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c01zA-0003qn-7h for emacs-devel@gnu.org; Fri, 28 Oct 2016 03:53:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c01z6-0005rX-9Z for emacs-devel@gnu.org; Fri, 28 Oct 2016 03:53:56 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45402) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c01z6-0005rK-6A; Fri, 28 Oct 2016 03:53:52 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:3723 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1c01z5-0007h1-Ab; Fri, 28 Oct 2016 03:53:51 -0400 In-reply-to: <87r3717brt.fsf@dustycloud.org> (message from Christopher Allan Webber on Thu, 27 Oct 2016 15:55:02 -0500) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:208927 Archived-At: > From: Christopher Allan Webber > Cc: Eli Zaretskii , Philipp Stephani , stefan.huchler@mail.de, emacs-devel@gnu.org > Date: Thu, 27 Oct 2016 15:55:02 -0500 > > Python's GIL + threading is probably not the best model to work off > of... while the GIL is largely misunderstood, there have been a lot of > challenges with getting this model to work nice. At one point, it > turned out that the GIL + threads would result in constant CPU > thrashing. This isn't the case any more, but it was once, and was a > challenging thing to fix: > > http://dabeaz.com/python/UnderstandingGIL.pdf It sounds like you are talking about problems inherent to Python threads, and not about what the concurrency branch in Emacs attempts to do. The problematic issues described in the above presentation are not relevant to the Emacs concurrency branch, because (1) it doesn't have the thread preemption for CPU-bound threads, and (2) it doesn't switch threads on _any_ I/O, just on I/O with an external process or user input, i.e. when Emacs calls pselect or its equivalent to see whether any input has arrived. So the performance penalties discussed in that presentation have nothing to do with what the Emacs concurrency branch implements.