Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp1859219rwi; Thu, 3 Nov 2022 09:50:26 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5ikoNy84gsDorHhyORktQq2HU9KxQ3uVt80xmjbMUjTccmx0XXODk2fGVjnfgaEcCNVKmq X-Received: by 2002:a17:902:f60d:b0:186:c6d7:6574 with SMTP id n13-20020a170902f60d00b00186c6d76574mr648530plg.171.1667494226730; Thu, 03 Nov 2022 09:50:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667494226; cv=none; d=google.com; s=arc-20160816; b=iY5GYWYahEFsMfM9j9Jy/GWbBNrL8ZSofOmSEEDZG0rxHTL9z5dCraRDDD60A0MsvL T/jHQH8gjYv8CtrxYEVqY0R9nB/SLLTnWXCQMpevTlRfQGr7hHmg2AsVqOdM4daOsrZf tKWCvTf5ZISshs3qyhK/cA6nSL5knCaXv330QCg2YquTqe4VuloTlo7TeAU9KjcWOfF2 YJzI61PFQr9E15nH8WLdntJVkfKxKxylJLXFnljiI5fw+gwSpudLyp1C6UrAiuemX3kk IFicayOIOc3O1/5yBhZNA0rpjg2Kugc5EEEwpQbVLpOMLIifn1FWdD7JOQ3l/6LE5wJQ sE+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:content-id:mime-version:subject :cc:to:references:in-reply-to:from:organization:dkim-signature; bh=Yg8hSmUtp8lzNDLyKE/qDpSLiTbyZAup75oCBqKmHiQ=; b=lLqEjxMkfxcGJ6X/JTcNo6ReKpj0wvtG98XlibV6PrJUa1xwARUBhH0523lwXoTCI/ DB0+HLpGZgk7dJ7vGoMnL9q/QyoJsb2Q0BOAsIhNbKzrtCNmssxXAftsUOb2i4P99YCe Ewqjgfa7CLTw/2AryeHTWkVCQUaV9OCsJeP6d2lpaP3WyMLedTCtiui3S8nAzDRo4jqT +Jxh6yvLZ1/efu3kyCV2C4L9RA/Kb5yKKe3SKVfMYlV/ToyFi3U3N++yudKjBigiZyYg 5fNR0wvZYS71Gs/UrjjOyM5OtuiJ2FmLlDhYjNwzD2Cx2umdkP8USY6pNZQT1Szkn4/r 6lFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=L16qhdlw; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g9-20020a636b09000000b004626957c3c7si1524082pgc.193.2022.11.03.09.50.08; Thu, 03 Nov 2022 09:50:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=L16qhdlw; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231313AbiKCQme (ORCPT + 99 others); Thu, 3 Nov 2022 12:42:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231899AbiKCQlq (ORCPT ); Thu, 3 Nov 2022 12:41:46 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80ED61C43B for ; Thu, 3 Nov 2022 09:38:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667493515; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Yg8hSmUtp8lzNDLyKE/qDpSLiTbyZAup75oCBqKmHiQ=; b=L16qhdlwGSTss0KCkL3Hn5sn34pY2kdgGxg7PB2XXO/+RJhlI+XwN9VqW4i1xJ5dTNVhws JWwma6oncOPCqnqHUu7wCjvm8Za7ntwQ6lCcv0eF5DafF/iBX9SfBHs1TUP4fWRfzOQezg upmb85cU+BxEIqrUkXIU9wHpQSE5zz0= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-253-9cTbRan8NTWwF0z6B3jGZA-1; Thu, 03 Nov 2022 12:38:34 -0400 X-MC-Unique: 9cTbRan8NTWwF0z6B3jGZA-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2558F85A59D; Thu, 3 Nov 2022 16:38:33 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.33.37.22]) by smtp.corp.redhat.com (Postfix) with ESMTP id 16280492B06; Thu, 3 Nov 2022 16:38:31 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <20221103161637.1725471-7-dwysocha@redhat.com> References: <20221103161637.1725471-7-dwysocha@redhat.com> <20221103161637.1725471-1-dwysocha@redhat.com> To: Dave Wysochanski Cc: dhowells@redhat.com, Anna Schumaker , Trond Myklebust , linux-nfs@vger.kernel.org, linux-cachefs@redhat.com, Benjamin Maynard , Daire Byrne Subject: Re: [RFC PATCH v10 6/6] netfs: Change netfs_inode_init to allocate memory to allow opt-in MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <108532.1667493511.1@warthog.procyon.org.uk> Date: Thu, 03 Nov 2022 16:38:31 +0000 Message-ID: <108533.1667493511@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=ham 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-nfs@vger.kernel.org Dave Wysochanski wrote: > This saves memory for network filesystems inode that would build > in netfs support, but like to opt-in to netfs on some mounts while > opting-out of netfs on other mounts. > ... > static struct inode *afs_alloc_inode(struct super_block *sb) > { > struct afs_vnode *vnode; > + int ret; > > vnode = alloc_inode_sb(sb, afs_inode_cachep, GFP_KERNEL); > if (!vnode) > return NULL; > > + ret = netfs_inode_init(&vnode->netfs, &afs_req_ops); > + if (ret) { > + afs_free_inode(AFS_VNODE_TO_I(vnode)); > + return NULL; > + } > atomic_inc(&afs_count_active_inodes); > > /* Reset anything that shouldn't leak from one inode to the next. */ This makes the memory footprint worse for 9p, afs, ceph and cifs - and adds a time penalty to inode creation and destruction as well (though probably not a huge amount). David