Received: by 2002:ab2:3141:0:b0:1ed:23cc:44d1 with SMTP id i1csp301032lqg; Fri, 1 Mar 2024 05:52:08 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW2iKk+9KqxOxGOEX9xIyRjMSD1be0a9ZsbmP0Ne69EvFK+/fXc9i2sz34exg6fCkpCFNwIhFauTZ0Zd32I6s+HV9FrG9tW1nLp6pXggA== X-Google-Smtp-Source: AGHT+IGt8Js3doGsoLkTMna8aP7FTkeVj90oean/PJYh6OfeahArtPvIXKyvANqQ9SrFeWQ/zlPH X-Received: by 2002:a17:90b:78a:b0:29a:d7ba:2c99 with SMTP id l10-20020a17090b078a00b0029ad7ba2c99mr1691264pjz.10.1709301128503; Fri, 01 Mar 2024 05:52:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709301128; cv=pass; d=google.com; s=arc-20160816; b=KKQIPLSsKqXdUGljtLRuMfgkQQAVSMJ54Dj2l1rhu7Nk9Cp9suS3l+8VXKYfXq/wqh 4WzcUBcBAAA/DdEXU3z4SjGVYmOlYW4thjeGP+pDmxZhKPiR9VetsVy7RpIlQ1Tz+PZ0 5jRQUwRFw6x5BNm/3gBpUjobCMqreKiBlxHsCkwNkRlmI0uLJ0eBO2eY1koXJSHGDYEn ZiECGClawzZfaODwOGkes3ZooyuNEYvhDZNogUbx3vt2WO9KC4xpJe8cpyQVDUuLO1fP D7gnkcKbzm1rJ4UBaTygujHCJPAC2tnXCt29BM+Q44DTetOT72rxzc2qskpi/l95F16c pACA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=uvKCAXMT8sNauk5+VTMaEUp0n/5PMKoLqFnsKI5EKpM=; fh=5St5brMQ4h5mBFbRxculj+8RXzrhqu8Z0RJ7NhYCbIc=; b=HdplqpQ0oVv9WyF+i0iZXiPcVUYJsEqHMnz37lzsfw89SOiX4sQYAvFoMorI5hwBxj G19KDBxLbWKqsQ4oad/NrPmkiUD12qcLDaZGH7bOtHWrEVy0wOY/G+fSXexNd9FfWoeD QxvRfIAlP0oso6x/aAhslrNBB2RPBwuaFpBC+RpF0dx9jkEjks2iL/T9fAjyFvpJITeq /ZP5ZoRXFvMKYYURGfVMiKvPsYEEKr111ZD+cUEw4sIjO1AANxKsPcf/Zw+dwIJhfaf6 AfzePzwVlo3LLnDtIzM3wUMWd0ypt6OmLdiWGR4KMk0K6Al4KVtShARH0Fvp7uWbTP9s CRAQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@szeredi.hu header.s=google header.b="Xa/y+QI5"; arc=pass (i=1 spf=pass spfdomain=szeredi.hu dkim=pass dkdomain=szeredi.hu dmarc=pass fromdomain=szeredi.hu); spf=pass (google.com: domain of linux-kernel+bounces-88509-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88509-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=szeredi.hu Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id qb9-20020a17090b280900b0029acb9d5bffsi3804002pjb.189.2024.03.01.05.52.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 05:52:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-88509-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@szeredi.hu header.s=google header.b="Xa/y+QI5"; arc=pass (i=1 spf=pass spfdomain=szeredi.hu dkim=pass dkdomain=szeredi.hu dmarc=pass fromdomain=szeredi.hu); spf=pass (google.com: domain of linux-kernel+bounces-88509-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-88509-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=szeredi.hu 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id B260F28B535 for ; Fri, 1 Mar 2024 13:45:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E85FF73186; Fri, 1 Mar 2024 13:42:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=szeredi.hu header.i=@szeredi.hu header.b="Xa/y+QI5" Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D985072907 for ; Fri, 1 Mar 2024 13:42:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709300550; cv=none; b=dj2KiJfIwXn6vItch9h9RNM/n/dkXPJmAk3hRyg9rO0ytmS/UhShwkh0kA5fjsM43VSV6EdX8qwvkEJOM22KLBc1YDuQhbXSrj1uCEGWJA4ZDQ5TRYUl1qrl5VgHsWSnOLsRO22moHyHTFkdj96ASysse4bi3mGZmq9PL1tXQX8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709300550; c=relaxed/simple; bh=uvKCAXMT8sNauk5+VTMaEUp0n/5PMKoLqFnsKI5EKpM=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=Gsht2vjimFBedHbHOlxewh57oWsj1+r91OPyZqJ5clKLxwCBTEjJDeU9snmlhgzdVoSAhT9QBJkQEzl8uINmD08OpoqrL9iKdZmlGbghJ6b0cYwhOBkbw+zLJglN8jNdFLpIS2qEgfDPj+f6o6XquP8ouzhgWncCFGyCKI6+O6c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=szeredi.hu; spf=pass smtp.mailfrom=szeredi.hu; dkim=pass (1024-bit key) header.d=szeredi.hu header.i=@szeredi.hu header.b=Xa/y+QI5; arc=none smtp.client-ip=209.85.218.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=szeredi.hu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=szeredi.hu Received: by mail-ej1-f54.google.com with SMTP id a640c23a62f3a-a446478b04bso203320466b.3 for ; Fri, 01 Mar 2024 05:42:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; t=1709300546; x=1709905346; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=uvKCAXMT8sNauk5+VTMaEUp0n/5PMKoLqFnsKI5EKpM=; b=Xa/y+QI5FgV+MlBdZq7FhfCRHkgJUwVA5XNu6hfTkLueDlioJdD5p5xQnpcdrbOdxS LhXk6D5C2G1yKoGH+TgTKRiIz1/Dttso3gqX3a5xTjUrXF1/w/E5WDWcbEn+4MzabFbr HT1q6hOMVkm0iOYmW7kFFH4JtSwohPDdX4M6M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709300546; x=1709905346; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=uvKCAXMT8sNauk5+VTMaEUp0n/5PMKoLqFnsKI5EKpM=; b=HW1bKRX2AXbhAmszOqFP5o1vfZb3CdpCAsLVBs5SXoUAWQ04+jOatvYlcyEBTR5+DI 3uVmqKRr77rVTsw3ZgSdpf6TnDn5Qi4ejtIZ5NixlFOt5CcEIQV0nnxf/x27g2x9uia7 nPV4G1JHpE6GE9lkc8em4lr23B5T3+aNfoNBEj9jbDaS76t5MgKD9PagFN3IKPkbP6rv 0qsYpLxshFDJnbk77Ext2Ym50GeVthFkbcJ97oiZZcDkHI4Rd5H64KBJbpq6dn3Eb2Vn aNDqexoPC/0r4AFufunDDhvKPJpiyaO2JU4L1oODWBA2IsRkWWhDmYJBSdfP/naCgfWm /tzw== X-Forwarded-Encrypted: i=1; AJvYcCUBC2jwBm31DEkYZnNVgIoxaB6tIdO6b7Hjazs6F0MMl2XLWBCYEgOg0pmi7qNEJyAYUiy4u4kcLRofhZgrmNvASyO9M1hnpS7+zKsj X-Gm-Message-State: AOJu0YxNyd4T7k6Vmko7lVmORzXtWcewafaCWADRgr4hPmUjYlZLOiXB AuFDBt4r/rjKJ2kazlZ2nN+gex4ZfAwJD3SDyeEk7P/TOKRkyLJgEXIPremonPQ3hOXo/N80S+Z 68bzATL9ohYtE07PLmtcnsnWS4jd/k7/QOr/8Ow== X-Received: by 2002:a17:906:b347:b0:a43:f170:aa44 with SMTP id cd7-20020a170906b34700b00a43f170aa44mr1504212ejb.47.1709300546044; Fri, 01 Mar 2024 05:42:26 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240228144126.2864064-1-houtao@huaweicloud.com> <20240228144126.2864064-2-houtao@huaweicloud.com> In-Reply-To: <20240228144126.2864064-2-houtao@huaweicloud.com> From: Miklos Szeredi Date: Fri, 1 Mar 2024 14:42:14 +0100 Message-ID: Subject: Re: [PATCH v2 1/6] fuse: limit the length of ITER_KVEC dio by max_pages To: Hou Tao Cc: linux-fsdevel@vger.kernel.org, Vivek Goyal , Stefan Hajnoczi , Bernd Schubert , "Michael S . Tsirkin" , Matthew Wilcox , Benjamin Coddington , linux-kernel@vger.kernel.org, virtualization@lists.linux.dev, houtao1@huawei.com Content-Type: text/plain; charset="UTF-8" On Wed, 28 Feb 2024 at 15:40, Hou Tao wrote: > So instead of limiting both the values of max_read and max_write in > kernel, capping the maximal length of kvec iter IO by using max_pages in > fuse_direct_io() just like it does for ubuf/iovec iter IO. Now the max > value for max_pages is 256, so on host with 4KB page size, the maximal > size passed to kmalloc() in copy_args_to_argbuf() is about 1MB+40B. The > allocation of 2MB of physically contiguous memory will still incur > significant stress on the memory subsystem, but the warning is fixed. > Additionally, the requirement for huge physically contiguous memory will > be removed in the following patch. So the issue will be fixed properly by following patches? In that case this patch could be omitted, right? Thanks, Miklos