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 9D42BC7EE22 for ; Tue, 9 May 2023 12:59:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235169AbjEIM7o (ORCPT ); Tue, 9 May 2023 08:59:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234811AbjEIM7n (ORCPT ); Tue, 9 May 2023 08:59:43 -0400 Received: from out-16.mta0.migadu.com (out-16.mta0.migadu.com [91.218.175.16]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E0F6559A for ; Tue, 9 May 2023 05:59:18 -0700 (PDT) Message-ID: <876d2357-496e-9031-5554-ceeb579f3525@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1683637156; 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: in-reply-to:in-reply-to:references:references; bh=Z6PFxV/q5G5ouA2pgPzoEa0HjwZPZJA8n6oqmO1cwB8=; b=jcJcSd13vB0rOewhfnbakgBpFzJbC2ijdenxJp62tY5yYu5mpxeXPAV3sQPSSe5nZeNKyA 5f1yNHZlJNWyAFcAY5sHaHQCqIcYSg3PsN5oCUJtnea0Gaeub+flwcAYGKMm3v4zSweDdP YbWKdVCiDXnAtYTNH9IN57w80F7N69U= Date: Tue, 9 May 2023 20:59:06 +0800 MIME-Version: 1.0 Subject: Re: [fuse-devel] [PATCH] fuse: add a new flag to allow shared mmap in FOPEN_DIRECT_IO mode Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Hao Xu To: fuse-devel@lists.sourceforge.net, miklos@szeredi.hu Cc: linux-fsdevel@vger.kernel.org, bernd.schubert@fastmail.fm, cgxu519@mykernel.net References: <20230505081652.43008-1-hao.xu@linux.dev> In-Reply-To: <20230505081652.43008-1-hao.xu@linux.dev> 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 On 5/5/23 16:16, Hao Xu wrote: > From: Hao Xu > > FOPEN_DIRECT_IO is usually set by fuse daemon to indicate need of strong > coherency, e.g. network filesystems. Thus shared mmap is disabled since > it leverages page cache and may write to it, which may cause > inconsistence. But FOPEN_DIRECT_IO can be used not for coherency but to > reduce memory footprint as well, e.g. reduce guest memory usage with > virtiofs. Therefore, add a new flag FOPEN_DIRECT_IO_SHARED_MMAP to allow > shared mmap for these cases. > > Signed-off-by: Hao Xu Hi Miklos, any comments on this one? Thanks, Hao