Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp946155rdb; Tue, 23 Jan 2024 23:08:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IEEGm9Jc5OF2ra13YLaQTyRbc07v6YFixO+lwIEHEXumq7BQ8iFxB/nFmQI9c2RVSOBt0+K X-Received: by 2002:a05:6808:1887:b0:3bd:5306:da9d with SMTP id bi7-20020a056808188700b003bd5306da9dmr1376339oib.65.1706080110746; Tue, 23 Jan 2024 23:08:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706080110; cv=pass; d=google.com; s=arc-20160816; b=JZO+C9V+Kz5JvyOiBMyeqlk2iGl1AoYfb/+P6YpfB4S+NiVYZORiijIFiLV4LkBh2Z c/4mj4G1a4UX24UwwI+hfx7UKjLBPojrEf4HJVuEvcsFszve4ZGRjkocsIuCvdA9SwYE U7Fq4RNNOYfkEc8SpnpnuG1+eQStpI+h6wIq+0osjd7XXwSHmT9QFjG0P6uTnGAE0aKC IY4fZMvbApsHD0nyhCCPCZW7q/up2yIqz4npJFivaS8JGxWBuC7aNTbffEBk8BgrYKP2 CoS5XKCmXEyMVxEAQQQoPNl7UAF0aPkC/4pyR/Gy9lU7XT7VOAncUXExHnBHTAQ1hLDd P15Q== 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=oyrHn4p97XrYJ8GGWDrjZDssiTqLW+nB/Q0vEbYfEpE=; fh=97rYz/AOXeJIjpyrMGCbVtgOzZ8ZYR0t+9okIWyVA8E=; b=k+bBRPscTIrfCHeYJgkbaiCEb3YapARQIwDi5ya9AEUaKJY+cg7D0C87PFWIQGe3hL aWQ/XE3ykTVIRRAx3vuRPuuV8/Up8AR4FYPV1Qm9OGv+Tj8OSPLn5OhPTpTsBCntsOVT yWPvODwIKEG7ay3pWZnYJP2FTPNEfJwP/c841Wav5m1MFJof5nxIke7AbId3/5fieKez YHsC0XRVPfflrpxAK27gsDAaq3//R52N3gQvSI9WoPb2DPgY2UTbS8MuW2stgqJHvooP 2MdYgy07QwSxQHy2p0QB8StQvzuKVhgQ0LkL0lhLIzmv0BSs9zI5hi9bJSD7RGsYttP7 vzPg== 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-36532-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-36532-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id w17-20020a63fb51000000b005cf588da70fsi10819392pgj.643.2024.01.23.23.08.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 23:08:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-36532-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; 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-36532-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-36532-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 575ABB21FF5 for ; Wed, 24 Jan 2024 07:05:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CEBF616428; Wed, 24 Jan 2024 07:05:25 +0000 (UTC) Received: from out30-132.freemail.mail.aliyun.com (out30-132.freemail.mail.aliyun.com [115.124.30.132]) (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 72099134CA; Wed, 24 Jan 2024 07:05:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.132 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706079925; cv=none; b=aBfi94LpkcLdhbMsAODNISHzdl67NJVKM8wKlWZ0ukv8Bs14O6ARCTctmIiU7d57gWS3171KPkNrOxPKBOKP6FmFY6OgoJ9A1kHBDmalGXuottq4egH69GEXZHeaTJZyDwpHBwe5Um7ygsW6WzweTiFozdfUNv8P/4okugP7Ykk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706079925; c=relaxed/simple; bh=JltRLPZqDNzmhUV4hjR1/UlE7k8lRufbY57HDg8lyWE=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=KR6S9AoJOazNMYhK3xXlxB2WsE00DQvZZAAPw2t9Zn+nXIpYgKvQWmXaMdcq/2SOyn50taxEs8qPcroP0eudDRjjgp8Iwoj26QzvdIUXakVKy9fBoGL8uXoBjtql02wqZJq8YC5HQ8HqYXgYiRYTFZA5QYakH6Rx0VQ7k33LkpU= 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.132 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=01201311R141e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046056;MF=jefflexu@linux.alibaba.com;NM=1;PH=DS;RN=4;SR=0;TI=SMTPD_---0W.FWLHZ_1706079912; Received: from localhost(mailfrom:jefflexu@linux.alibaba.com fp:SMTPD_---0W.FWLHZ_1706079912) by smtp.aliyun-inc.com; Wed, 24 Jan 2024 15:05:12 +0800 From: Jingbo Xu To: miklos@szeredi.hu, linux-fsdevel@vger.kernel.org Cc: linux-kernel@vger.kernel.org, zhangjiachen.jaycee@bytedance.com Subject: [PATCH] fuse: increase FUSE_MAX_MAX_PAGES limit Date: Wed, 24 Jan 2024 15:05:12 +0800 Message-Id: <20240124070512.52207-1-jefflexu@linux.alibaba.com> X-Mailer: git-send-email 2.19.1.6.gb485710b Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Xu Ji Increase FUSE_MAX_MAX_PAGES limit, so that the maximum data size of a single request is increased. This optimizes the write performance especially when the optimal IO size of the backend store at the fuse daemon side is greater than the original maximum request size (i.e. 1MB with 256 FUSE_MAX_MAX_PAGES and 4096 PAGE_SIZE). Be noted that this only increases the upper limit of the maximum request size, while the real maximum request size relies on the FUSE_INIT negotiation with the fuse daemon. Signed-off-by: Xu Ji Signed-off-by: Jingbo Xu --- I'm not sure if 1024 is adequate for FUSE_MAX_MAX_PAGES, as the Bytedance floks seems to had increased the maximum request size to 8M and saw a ~20% performance boost. --- fs/fuse/fuse_i.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h index 1df83eebda92..6bd2cf0b42e1 100644 --- a/fs/fuse/fuse_i.h +++ b/fs/fuse/fuse_i.h @@ -36,7 +36,7 @@ #define FUSE_DEFAULT_MAX_PAGES_PER_REQ 32 /** Maximum of max_pages received in init_out */ -#define FUSE_MAX_MAX_PAGES 256 +#define FUSE_MAX_MAX_PAGES 1024 /** Bias for fi->writectr, meaning new writepages must not be sent */ #define FUSE_NOWRITE INT_MIN -- 2.19.1.6.gb485710b