Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp814307pxb; Fri, 22 Apr 2022 11:44:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyM9K1iRhO1RT2aD2MYQXj8eJ+L8zYnwZsSW+97UGRB/W4A1nnW6npSlY1WsnfqCCiPb8kH X-Received: by 2002:a17:902:d5ce:b0:158:48db:9719 with SMTP id g14-20020a170902d5ce00b0015848db9719mr5902862plh.7.1650653071974; Fri, 22 Apr 2022 11:44:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650653071; cv=none; d=google.com; s=arc-20160816; b=nqeTAGqIqsc6pYWqKkUKy1JbNbbpIkbRpWjBaXNVF0W/m7MUPC20ZSl0cQlxLNlB4Z giCn7W4uqFoSGDzIvGgHiy8mXiYmWrpRoYBbnT5k74Q9nnPM+z8buCw82Yi2sj8K2ROx tJ3zRy753oC9abYJUyLLx3aeMAgWR7GcwUcSAhnCpxQvc9M05b8R3FfY77NDK7LspUTG vzBX+kJWGZk39y0XfTWXZC4Uq09oyPsvn4weTf3NdRoRxY9M0xBn9qE8nfMJ7kFR7Cuj eyS6Xl9XfBM3kPGSGoWcjwzhrg9hAWZAjGSTCqbSbjonJw+C106dwzkrpfER2NCgpoFQ eyBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:mail-followup-to:message-id:subject:cc:to:from:date; bh=rvq0S9iqK9CYf7J19i6mFj80GnWD+a+ajzuxm4iyHu4=; b=lRLvVFDJsMBo4Qyt/LeTtowHMq2UT+CUZw4by+Fq0ICpdUPdArvz+IMgjZ2TcCPKZy vKbyFZXkGzxPTNXZ46PpNvp4TXZ4zWVTbJWfipsbT9RIe7UHtdbEVJwEFxMrnSS54Oq2 RCsRPkqWBxBjQAFDxKdr539By5itwtO1T5zs7TqJ8PM60CpgcSWHYBXqTm+8hRsL68pH k8S4fbsuDXe25AMp0El1xzZO/3wI3qNFnGZgy/dUcVHw2CynyTop+JXjyTH4afAJSOT3 LkMYCLMtZ1fKxNgyqflAx28Esx2x7VfJvkW7CYN9f4IlTx7pQHt3HEnSHlVQ1nTz+UX6 GEDQ== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id d5-20020a170902aa8500b00156c0b0a42asi8360559plr.113.2022.04.22.11.44.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Apr 2022 11:44:31 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 841CBD3DB1; Fri, 22 Apr 2022 11:12:41 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1391188AbiDUSTf (ORCPT + 99 others); Thu, 21 Apr 2022 14:19:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377142AbiDUSTe (ORCPT ); Thu, 21 Apr 2022 14:19:34 -0400 Received: from out30-56.freemail.mail.aliyun.com (out30-56.freemail.mail.aliyun.com [115.124.30.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DEBF53E0D5; Thu, 21 Apr 2022 11:16:42 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R171e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04357;MF=hsiangkao@linux.alibaba.com;NM=1;PH=DS;RN=20;SR=0;TI=SMTPD_---0VAh.Br2_1650564996; Received: from B-P7TQMD6M-0146.local(mailfrom:hsiangkao@linux.alibaba.com fp:SMTPD_---0VAh.Br2_1650564996) by smtp.aliyun-inc.com(127.0.0.1); Fri, 22 Apr 2022 02:16:38 +0800 Date: Fri, 22 Apr 2022 02:16:36 +0800 From: Gao Xiang To: David Howells Cc: JeffleXu , linux-cachefs@redhat.com, xiang@kernel.org, chao@kernel.org, linux-erofs@lists.ozlabs.org, torvalds@linux-foundation.org, gregkh@linuxfoundation.org, willy@infradead.org, linux-fsdevel@vger.kernel.org, joseph.qi@linux.alibaba.com, bo.liu@linux.alibaba.com, tao.peng@linux.alibaba.com, gerry@linux.alibaba.com, eguan@linux.alibaba.com, linux-kernel@vger.kernel.org, luodaowen.backend@bytedance.com, tianzichen@kuaishou.com, fannaihao@baidu.com, zhangjiachen.jaycee@bytedance.com Subject: Re: EMFILE/ENFILE mitigation needed in erofs? Message-ID: Mail-Followup-To: David Howells , JeffleXu , linux-cachefs@redhat.com, xiang@kernel.org, chao@kernel.org, linux-erofs@lists.ozlabs.org, torvalds@linux-foundation.org, gregkh@linuxfoundation.org, willy@infradead.org, linux-fsdevel@vger.kernel.org, joseph.qi@linux.alibaba.com, bo.liu@linux.alibaba.com, tao.peng@linux.alibaba.com, gerry@linux.alibaba.com, eguan@linux.alibaba.com, linux-kernel@vger.kernel.org, luodaowen.backend@bytedance.com, tianzichen@kuaishou.com, fannaihao@baidu.com, zhangjiachen.jaycee@bytedance.com References: <2067a5c7-4e24-f449-4676-811d12e9ab72@linux.alibaba.com> <20220415123614.54024-3-jefflexu@linux.alibaba.com> <20220415123614.54024-1-jefflexu@linux.alibaba.com> <1447543.1650552898@warthog.procyon.org.uk> <1484181.1650563860@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1484181.1650563860@warthog.procyon.org.uk> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,UNPARSEABLE_RELAY autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi David, On Thu, Apr 21, 2022 at 06:57:40PM +0100, David Howells wrote: > JeffleXu wrote: > > > 2. Our user daemon will configure rlimit-nofile to a reasonably large > > (e.g. 1 million) value, so that it won't fail when trying to allocate fds. > > There's a system-wide limit also; simply increasing the rlimit won't override > that. Yes, I suggest that we should add some words to document this to system administrators to take care of `/proc/sys/fs/file-max', but I think it's typically not a problem about our on-demand cases. Since each cookie equals to an erofs device, so not too many erofs devices (much like docker layers) for one erofs images and they are all handled when mounting (which needs privilege permissions.) And due to this, fscache dir can be easily backed up, restored, and transfered since they are really golden erofs image files. Thanks, Gao Xiang > > David