From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0A0ECC77B7E for ; Tue, 2 May 2023 07:36:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233421AbjEBHgN (ORCPT ); Tue, 2 May 2023 03:36:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233612AbjEBHgL (ORCPT ); Tue, 2 May 2023 03:36:11 -0400 X-Greylist: delayed 426 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 02 May 2023 00:36:09 PDT Received: from out-33.mta1.migadu.com (out-33.mta1.migadu.com [95.215.58.33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88C1AA7 for ; Tue, 2 May 2023 00:36:09 -0700 (PDT) Message-ID: <5683716d-9b1d-83d6-9dd1-a7ad3d05cbb1@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1683012541; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jzCTaX5QqHIzcnQYUNgKpxeG5oQbABeP8YtdxvhEkoY=; b=gaP6Wgtj5ThKgz3Q15jUn17ckxESUjroZAwDmaCbcnQZAYKcpreBRs/HxWEYBxj5bWv3lR Erow+92AsAesMxp00/7nt7y1JO6LEHqp1iGbK9898ZD9IXAeC1Hk5bYWF9R+vsOPgrBeYL doVww22+lJJmFKmnGPjO1ckPW74zdVA= Date: Tue, 2 May 2023 15:28:50 +0800 MIME-Version: 1.0 Content-Language: en-US To: "fuse-devel@lists.sourceforge.net" , miklos@szeredi.hu Cc: Antonio SJ Musumeci , linux-fsdevel@vger.kernel.org, Bernd Schubert X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Hao Xu Subject: [RFC] FUSE: add another flag to support shared mmap in FOPEN_DIRECT_IO mode Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org Hi all, From discussion with Bernd, I get that FOPEN_DIRECT_IO is designed for those user cases where users want strong coherency like network filesystems, where one server serves multiple remote clients. And thus shared mmap is disabled since local page cache existence breaks this kind of coherency. But here our use case is one virtiofs daemon serve one guest vm, We use FOPEN_DIRECT_IO to reduce memory footprint not for coherency. So we expect shared mmap works in this case. Here I suggest/am implementing adding another flag to indicate this kind of cases----use FOPEN_DIRECT_IO not for coherency----so that shared mmap works. Thanks, Hao