Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp683590rdb; Thu, 22 Feb 2024 16:59:53 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV1b4hA+CWPS7Q1janWYdJlBhhfZ5GjAYFSg9QgYexF6ADSbg1yRafKSX2now9CvIUAmnEnJuLGpxvxUMrzlRG2FI5hSEilyeljL5sknA== X-Google-Smtp-Source: AGHT+IEuW6OXbMi532kb0bD+rjsZwB6DikYmdQhwJIrSn/nIKMd3JYCg+7xVCM2Aug6ALzxos1pL X-Received: by 2002:a1f:e743:0:b0:4c0:9ed8:57b3 with SMTP id e64-20020a1fe743000000b004c09ed857b3mr741688vkh.1.1708649992813; Thu, 22 Feb 2024 16:59:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708649992; cv=pass; d=google.com; s=arc-20160816; b=IyqJAbut9WHYM2gS7lL77OUkQ15q/uYiuJu+etzHroLaG1Y5DHlhf1DBVDgY1wf59L cUZ68iPSEa5BWXTXyqyQ0ohacMzlNqyV+UNeXkTM4UIMO6X/IWZGxSocqWjTVcbF+Vi5 ARQrALGzt7fKTAf1GJ8I5KBBSb529rLA1hUDdHo8dVgbQlGOuRUshK4Yic6rSONHMTsN r0Kq/jIPwPByXKcwESbMDZPvTp1t0nkouDgO+iAvtROAS47Ev3fVtEaX5oOvWlVnZ6iA xhJvyXKKGXStu4BElKhvn+ZmP1gwSgW+Gq9fNWTNVok+8H7ANmIyvy5i/3yrNFPQAbBE hGBg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-language:content-transfer-encoding:in-reply-to:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:user-agent:date :message-id:from:references:cc:to:subject; bh=NgbZ0ZCYtqtUCmcF+ysC/YN7+ja6KIyXTxwEmVEIUc4=; fh=UdubcbWKBxlcqKisNkVQrHy/IZ9HNVh0qrfmKiaxja0=; b=z1TJYX5n73tgj5xePdPgEly+sCU4Pcdxao3YlIjAeb8DEZM8UiLt4yx3wfDv3zcMcd lDB0ZGp9mNhxq8jhcg3twll6wE4JSl8KedaJXoUdtRQY4G5oGVFePEvJkZ0tH5psrdq3 AtKMGXsPPQwP7ZfphamD0MiLR/xb+fYUc6vgpWGqycXfFaiGRh+JKExnoAuWO8EYJ0Sn 9hC/2rmhc1RV/veyedz5oX6uLuUtOPgb29ZhP/RF7BCk//J5b9bXuOMvlobU8Yj8JXU5 ThIBtInXCiJpnx0EYVwsRc2VoOtmUfR+s6Cufvb1YeN7ZB+3HkYyHg+zeSNhBGx+ZqBl bVsg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huaweicloud.com); spf=pass (google.com: domain of linux-kernel+bounces-77598-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77598-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id q14-20020a05621419ee00b0068fad0f7291si4020712qvc.563.2024.02.22.16.59.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 16:59:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-77598-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huaweicloud.com); spf=pass (google.com: domain of linux-kernel+bounces-77598-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-77598-linux.lists.archive=gmail.com@vger.kernel.org" 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 8ED701C217F6 for ; Fri, 23 Feb 2024 00:59:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8EBC2B642; Fri, 23 Feb 2024 00:58:42 +0000 (UTC) Received: from dggsgout11.his.huawei.com (unknown [45.249.212.51]) (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 49AFBE57B; Fri, 23 Feb 2024 00:58:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708649922; cv=none; b=rw5/sx7bQCfqZYuR9PJCj3ItJ9gXcbsFF8tfHvqTm4rYM1aM8he9ZdBctq9WV8BM8wGnLGuKs8ZGKrexcYlzrkco90jTOw1nvCpiaANMrDjpUSIjwwfrltAAJl0dhHfG+TUZi2M3UmTez8o7JR6W83hX43HQ9dZ0RwYztC9A97o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708649922; c=relaxed/simple; bh=NgbZ0ZCYtqtUCmcF+ysC/YN7+ja6KIyXTxwEmVEIUc4=; h=Subject:To:Cc:References:From:Message-ID:Date:MIME-Version: In-Reply-To:Content-Type; b=AaSdfqBdyVkDn74WkTU6RfEC4Xh1CbH65xTD2ViTfUgc70ghYGyUC0hm4jMnKIovwLBIhtZkuTXQMbO+pg8oO75AVKEriN2zZ2JXRy4OxOuurtBz57eePhhUr/nqIAVE7lAljWr4WVnsV96ZJ6HlhPQnMMeOAxE8GPle8yCBVLA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com; spf=pass smtp.mailfrom=huaweicloud.com; arc=none smtp.client-ip=45.249.212.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huaweicloud.com Received: from mail.maildlp.com (unknown [172.19.163.216]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4Tgs872WGvz4f3kKN; Fri, 23 Feb 2024 08:58:31 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.75]) by mail.maildlp.com (Postfix) with ESMTP id 911FA1A0C11; Fri, 23 Feb 2024 08:58:34 +0800 (CST) Received: from [10.174.176.117] (unknown [10.174.176.117]) by APP2 (Coremail) with SMTP id Syh0CgB3mQy27ddl69zGEw--.6075S2; Fri, 23 Feb 2024 08:58:34 +0800 (CST) Subject: Re: [PATCH] virtiofs: limit the length of ITER_KVEC dio by max_nopage_rw To: "Michael S. Tsirkin" Cc: linux-fsdevel@vger.kernel.org, Miklos Szeredi , Vivek Goyal , Stefan Hajnoczi , linux-kernel@vger.kernel.org, virtualization@lists.linux.dev, houtao1@huawei.com, Bernd Schubert References: <20240103105929.1902658-1-houtao@huaweicloud.com> <20240222144828-mutt-send-email-mst@kernel.org> From: Hou Tao Message-ID: <2fe9376d-27a6-d502-9acb-3890b3d3946f@huaweicloud.com> Date: Fri, 23 Feb 2024 08:58:30 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In-Reply-To: <20240222144828-mutt-send-email-mst@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-CM-TRANSID:Syh0CgB3mQy27ddl69zGEw--.6075S2 X-Coremail-Antispam: 1UD129KBjvJXoW7Ary8Gw1fGF4furW7CFW3ZFb_yoW8JFy5pF WaqayqgFn2qF47Aw12ya1UZry0vws5Gr13tr18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> >> When trying to insert a 10MB kernel module kept in a virtiofs with cache >> disabled, the following warning was reported: >> SNIP >> >> A feasible solution is to limit the value of max_read for virtiofs, so >> the length passed to kmalloc() will be limited. However it will affects >> the max read size for ITER_IOVEC io and the value of max_write also needs >> limitation. So instead of limiting the values of max_read and max_write, >> introducing max_nopage_rw to cap both the values of max_read and >> max_write when the fuse dio read/write request is initiated from kernel. >> >> Considering that fuse read/write request from kernel is uncommon and to >> decrease the demand for large contiguous pages, set max_nopage_rw as >> 256KB instead of KMALLOC_MAX_SIZE - 4096 or similar. >> >> Fixes: a62a8ef9d97d ("virtio-fs: add virtiofs filesystem") >> Signed-off-by: Hou Tao > > So what should I do with this patch? It includes fuse changes > but of course I can merge too if no one wants to bother either way... The patch had got some feedback from Bernd Schubert . And I will post v2 before next Thursday.