From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Ken Raeburn Newsgroups: gmane.emacs.devel Subject: Re: Introducing thread-safe Tramp Date: Tue, 24 Jul 2018 04:25:12 -0400 Message-ID: References: <8736wa9c5s.fsf@gmx.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 11.3 \(3445.6.18\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1532420604 26078 195.159.176.226 (24 Jul 2018 08:23:24 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 24 Jul 2018 08:23:24 +0000 (UTC) Cc: Dmitry Gutov , emacs-devel@gnu.org To: Michael Albinus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 24 10:23:19 2018 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 1fhsbH-0006iw-Hh for ged-emacs-devel@m.gmane.org; Tue, 24 Jul 2018 10:23:19 +0200 Original-Received: from localhost ([::1]:38931 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhsdO-0001g0-64 for ged-emacs-devel@m.gmane.org; Tue, 24 Jul 2018 04:25:30 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56236) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fhsdF-0001eS-5C for emacs-devel@gnu.org; Tue, 24 Jul 2018 04:25:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fhsdA-0000lM-BB for emacs-devel@gnu.org; Tue, 24 Jul 2018 04:25:21 -0400 Original-Received: from mail-yw0-x22e.google.com ([2607:f8b0:4002:c05::22e]:36487) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fhsdA-0000kj-33 for emacs-devel@gnu.org; Tue, 24 Jul 2018 04:25:16 -0400 Original-Received: by mail-yw0-x22e.google.com with SMTP id v197-v6so1233804ywg.3 for ; Tue, 24 Jul 2018 01:25:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raeburn-org.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=GE5y4PIWE23x5uYfSJLhN9zjmaZ97ZamQQCp8ceH8e0=; b=BJVrvanwLZ7ENIWhR4iR0/VacD5MctONCGP2C497SoHzsFxNMYf4toi5LEiDDI69WQ 0LdHKRwQSR7wf9INCXy3bumvP+QwNe1wdkIMuPHiVuIu6Lh93YfWuDrIFQbidRRRT/d8 SPsF3lPxC0FihgsgBtKEQVauBWkMWHeianzhG6Aw22XVMTjH6VOWrNC09gtwXG+Gu9Sd Myoj6DC90eY2sW3es+IJHmopGgr+nhKiM2j82UYr7jB2WlZtSx8gSxXoC7SSa9dlxHzQ csKOL/BZvN+bLZbXFIkLgnfUqK1p3AXBewGZ6/jwX91TTCrGRjyqeWk3uvlrS2ABgbix qcng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=GE5y4PIWE23x5uYfSJLhN9zjmaZ97ZamQQCp8ceH8e0=; b=m/oAtMAP4Q/N6Mp1u+hal0JhGdH8T3LPEoPIhQvQa7TemdxeasnHVIuWwJwFPUKhCz hUIan49YWxo54nmrRl4mq15xlAoJD7tVelNVAoAG3xBtVJtRrZp/na+IAJ1csQtzdPIz 1Rg4Cy0IlFrH3SvHQjW9opYXNDsD6yars35MJUL4sO52Fytg+PBWgvRcgvLtVeislq5X 4YVva464oUMCaorXxM8EXCF/A50uPuQz6BIH8foZ8nX/dFORaxERVIqhjzgnO3PbrDK6 8j/jbDclq+PktudQowe9YJz/u6htVdJl31hO2a7OncmlqWxs8SFvrXGqQFEAi7uWyjEP HfpA== X-Gm-Message-State: AOUpUlEbjzAZU1oMUuXtyWTu8cGM+gkUiyb+71ByfhPtgTEq1ekCa6bT TMahAwZxg5EvCa93T+4QjJQZUw== X-Google-Smtp-Source: AAOMgpey7PWi32fBAPDVB+0viyZGw3n83NMg+AIXpfUS9FETkkmVOTs6wbgR+SCGp7jXAKzH8UA56w== X-Received: by 2002:a0d:e28d:: with SMTP id l135-v6mr8359050ywe.234.1532420715043; Tue, 24 Jul 2018 01:25:15 -0700 (PDT) Original-Received: from [192.168.23.135] (c-73-253-167-23.hsd1.ma.comcast.net. [73.253.167.23]) by smtp.gmail.com with ESMTPSA id n3-v6sm6931248ywb.70.2018.07.24.01.25.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Jul 2018 01:25:14 -0700 (PDT) In-Reply-To: <8736wa9c5s.fsf@gmx.de> X-Mailer: Apple Mail (2.3445.6.18) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4002:c05::22e 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:227756 Archived-At: On Jul 23, 2018, at 11:58, Michael Albinus = wrote: >=20 > Hi, >=20 > I have created a new branch feature/tramp-thread-safe. The major = change > is making Tramp thread-safe, that means, several basic file operations > can run concurrently now. This sounds great! I haven=E2=80=99t had much time for Emacs work recently but I=E2=80=99ll = try to try this out soon. The changes you describe to the find-file interfaces relate to another = idea I=E2=80=99ve been thinking of for a while, though I wanted to wait = until I had time to look into it a bit more myself. Namely, make some of = the C-level local file system interactions release the global lock, and = use additional threads for invoking some of those operations. So, for example, while loading a large file from a slow NFS server, we = can also be processing subprocess output, running garbage collection, = etc. If the NFS server hangs, ^G should interrupt the main UI thread = that=E2=80=99s sitting waiting for a notification from the file I/O = thread (which is hung until the server comes back or the access times = out; however, other file I/O threads could be used to access other files = or file systems), break it out of the wait, and let the user go do = something else. In auto-save-mode or auto-revert-mode, read/write/stat = calls shouldn=E2=80=99t cause delays in the UI just because a file = server is slow. There are plenty of details I haven=E2=80=99t worked out, like what to = do about these background threads acting on a buffer the user is = actively modifying at the same time. But one thing that had occurred to = me was that as far as the user interaction is concerned, a multithreaded = Tramp would be just the way to try out some of these sorts of changes. Ken=