Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp388606rdb; Tue, 23 Jan 2024 02:58:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IGuZ5y6aH9iDRa+2JitZ3AgT9GU3TFsGWIklt6CnYxwq1Ol8SVwkiXjQKD8//Wl2zi1gP2r X-Received: by 2002:aa7:cd59:0:b0:55a:9159:3d13 with SMTP id v25-20020aa7cd59000000b0055a91593d13mr739251edw.66.1706007517335; Tue, 23 Jan 2024 02:58:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706007517; cv=pass; d=google.com; s=arc-20160816; b=nMNfUUu/bFWt6qGOXtCn0ejmCGRWjfCIOSYvglXqJMM6SuVdNJYiubbmogTBxSRyWV gfW7EXbLi2WX2vtDbtdOxVZclZTPZGIDC6xuFNGrNuLb9if2BGwzlqZVQfy8LixXSHwl u66vbmP+FyIw0lq/LE0vTCaCNDHTaeoxpDyjnIsfXj+WTBE6B51t+u/ciFgMwl4pKk3w 8szPyUh3Ii/KhHGjbTB7dPw2EqBZWg3tIwTlW/bP7A4KKRbqY1bMGgmydyMNqhY4yGtX ImsjYl2VmUnfF84+0oCXI1E99DwT7jpouHT3smAtAzyDCcQeWs7gy3N4JBucGgKKO537 g5qw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=giPbg3lIi9sVKd3HhBNSx1V3ME/0j4xhoKoOo+CrGV0=; fh=GHKxzbF/67LdqIbctQu7G3CwpePYLBnz++YBfQMoZgI=; b=wQtoreTwHk/uoc9JZwswLBhPwUlJJ9aJblQ0IVQtKxTbd+RavtY3usalCXqinL/cHP GH5Xv3CZOoxGe6JkY/+2XhKExMwTcMOuv3kS6ywHgUa0fPUGhPhdfHXxHhk1UrlFhaD4 gInGmxRPGrLMl+Qmuc1RQRau1luelRUSlUlwqCpuyrMXIcFSxUGu0jXV14vvU8SBLTbc 5Q3VRu+SY3H7j9fdtxu6FabfDFcQezmXzVG0OEu3A26JsqBVxeRgFHXaG1Jo+KXUJKcy n1qxDmNJxXuHEsWTdBzjGb8n5SxShPm6GnWPWEfMhA8VVzapOqEgLscHFpR3qxludDkO w5yw== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=linux.alibaba.com dmarc=pass fromdomain=linux.alibaba.com); spf=pass (google.com: domain of linux-kernel+bounces-35137-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35137-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id fi14-20020a056402550e00b00557a9932fb7si12332640edb.150.2024.01.23.02.58.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 02:58:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-35137-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=linux.alibaba.com dmarc=pass fromdomain=linux.alibaba.com); spf=pass (google.com: domain of linux-kernel+bounces-35137-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35137-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 12A941F22DB8 for ; Tue, 23 Jan 2024 10:58:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CD14D5C91A; Tue, 23 Jan 2024 10:58:22 +0000 (UTC) Received: from out30-99.freemail.mail.aliyun.com (out30-99.freemail.mail.aliyun.com [115.124.30.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 63A9E5C908; Tue, 23 Jan 2024 10:58:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.99 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706007502; cv=none; b=AL9PBR4tHRe+Qa8DArknXTkYwmQLRDjfZJRjXz7EHfqEv1F9/hH4yT86Y2beJ46igQGo11cwx11nZyLufsowZhb8VnD/yizdFu1tykDvWI1fZRy3DgmO/ACDdM7WdkRcbM+YEpOMOqDsURsbsn5VYMNb/t5qtG4VY6a5jri0GXA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706007502; c=relaxed/simple; bh=5zPOFE3A4m+p7S/1E46Gz/eFCoCUJsr0vNBF3Qh4MHc=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=aiSdZCX1Z0o72Ls3MsI1hDaNyRY9x8JMI13Pee9HRrytGn5ntoToOMj06WrbGwVcG8rdKPXUv1BUK6mGJwQ++pVzgZpsFzsCvnT/xjjXf0xJ8m9tWyQ4NBC0kDQ8HLlsPoIvXZKl02DPymcoAa36I7ydYiox4gETKfn/UkuG3iM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; arc=none smtp.client-ip=115.124.30.99 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R161e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046059;MF=hsiangkao@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0W.CYDCD_1706007484; Received: from e69b19392.et15sqa.tbsite.net(mailfrom:hsiangkao@linux.alibaba.com fp:SMTPD_---0W.CYDCD_1706007484) by smtp.aliyun-inc.com; Tue, 23 Jan 2024 18:58:09 +0800 From: Gao Xiang To: Miklos Szeredi , Stefan Hajnoczi , Vivek Goyal Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Gao Xiang Subject: [PATCH] virtiofs: avoid unnecessary VM_MIXEDMAP for mmap support Date: Tue, 23 Jan 2024 18:58:03 +0800 Message-Id: <20240123105803.1725795-1-hsiangkao@linux.alibaba.com> X-Mailer: git-send-email 2.39.3 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit After commit e1fb4a0864958 ("dax: remove VM_MIXEDMAP for fsdax and device dax"), VM_MIXEDMAP seems unnecessary for virtiofs DAX mapping (devmap). At least I'm not sure why VM_MIXEDMAP is used during some internal review (I guess that was added due to the current DAX documentation), it could avoid copying page table when forking since page faults could fill DAX VMAs just fine. Signed-off-by: Gao Xiang --- fs/fuse/dax.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/fuse/dax.c b/fs/fuse/dax.c index 12ef91d170bb..5a3c17a80340 100644 --- a/fs/fuse/dax.c +++ b/fs/fuse/dax.c @@ -858,7 +858,7 @@ int fuse_dax_mmap(struct file *file, struct vm_area_struct *vma) { file_accessed(file); vma->vm_ops = &fuse_dax_vm_ops; - vm_flags_set(vma, VM_MIXEDMAP | VM_HUGEPAGE); + vm_flags_set(vma, VM_HUGEPAGE); return 0; } -- 2.39.3