mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Enke Chen <enkechen@cisco.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Helios Tsoi (hetsoi)" <hetsoi@cisco.com>,
	Enke Chen <enkechen@cisco.com>
Subject: Re: [PATCH] FUSE: add the async option for the flush/release operation
Date: Wed, 10 Aug 2016 09:50:01 -0700	[thread overview]
Message-ID: <87ed11a3-bbe7-93b8-5d65-098482f5903e@cisco.com> (raw)
In-Reply-To: <CAJfpegupoKV7T2CG6DXKMok9gDBJbq7icpxUHB-L7XmjDF79nQ@mail.gmail.com>

Hi, Miklos:

On 8/9/16 11:52 PM, Miklos Szeredi wrote:
> On Wed, Aug 10, 2016 at 5:26 AM, Enke Chen <enkechen@cisco.com> wrote:
>> Hi, Miklos:
>>
>> This patch adds the async option for the flush/release operation in FUSE.
>>
>> The async flush/release option allows a FUSE-based application to be terminated
>> without being blocked in the flush/release operation even in the presence of
>> complex external interactions. In addition, the async operation can be more
>> efficient when a large number of fuse-based files is involved.
>>
>> ---
>> Deadlock Example:
>>
>>     Process A is a multi-threaded application that interacts with Process B,
>>     a FUSE-server.
>>
>>
>>                UNIX-domain socket
>>     App (A)  -----------------------  FUSE-server (B)
>>        |                                   |
>>        |                                   |
>>        |                                   |
>>        +-----------------------------------+
>>                open/flush/release
> 
> Why would the fuse server want to communicate with the app (using
> other than the filesystem)?

In this particular case, the other communication channel is used to coordinate
the allocation (with "open") and de-alocation (with "flush/release") of the
shared memory associated with the opened "file".

In general an application may have special handling for the "flush/release"
operation that involve external interactions with one or more other processes,
and that is where this "async" operation can help.

IMO it would be even better if the "async" operation can be made the default so
folks do not need to worry about this types of deadlocks.  From reading of the
code, it seems that FUSE does "async" release under certain conditions already.

Thanks.  -- Enke

  reply	other threads:[~2016-08-10 19:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <eb9110ce-f2ad-b717-32fb-1dfe5487f02f@cisco.com>
2016-08-10  3:26 ` Enke Chen
2016-08-10  6:52   ` Miklos Szeredi
2016-08-10 16:50     ` Enke Chen [this message]
2016-08-15  9:36       ` Miklos Szeredi
2016-08-16 19:53         ` Enke Chen

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ed11a3-bbe7-93b8-5d65-098482f5903e@cisco.com \
    --to=enkechen@cisco.com \
    --cc=hetsoi@cisco.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®