Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp165076rdb; Fri, 29 Sep 2023 22:47:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGlDTeddtatNPPqCu8F5HdBNFp03NytQcRF+R5opqAJby+1HAO8FxKtEaALm4P5LsrKfeV/ X-Received: by 2002:a17:90b:1297:b0:267:eeee:ab17 with SMTP id fw23-20020a17090b129700b00267eeeeab17mr5938981pjb.45.1696052874571; Fri, 29 Sep 2023 22:47:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696052874; cv=none; d=google.com; s=arc-20160816; b=ik6YeilS2XtA+c0wUdF/WXkEO0+Ywpn9F0dIN78kLrzpQqH1DX+wS7cwRMfDS2/E5F h4CcJXnRtX1wxCjnCP26RxgcFfTloTN4VLdMOo9OwA4kLFBMFquSscz9qU+y0HRcgtdJ 0Jg4gDE7X+7854X1r7/uyt19WvuiyxZNKzjS59vOE07V4aCjtfSWRWmCX15UzVyK0omj 4cXh/a9oExUMafv8LXumoUKKOAucUspf28S+7mlTX1/kcMIbr/Z+Bt+xmcT0tBF8+/a4 w3BNgfZKNtEpd8bO/4obf/611x6JcAIWvzRMPc95BtzsJcpc62c292SztipBpY/FCjgC XTFw== 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:message-id:subject:cc:to:from:date:dkim-signature; bh=N4F2QfXt0qCvJT+KbS3ZaeUVFr/M0rdBm91MXelB3ww=; fh=zXvvmTEFgDBRUdysYm70CsV0c5I4cFHeq+uLji5I1UU=; b=gfQRH3ajiXwktCFUuxiOaw7sK5p/Vg+MsxpmoIiuShncHd6T9MkZmoPIv58oGOQP+L mQT3Siuu50Fz0lafUYFdgP8TlxwWgmSw9M5BLkM+7oFMTo26vAYYzh5dY5SP3ARc3gpb E0Kopd/0aQHSB802ZnRfCHSFSaazo+YhuEYmRdyYxazH6EfnC9juqHzrLYGPXKLqzNU7 vXDbQUOQMCHcod/Ip3jFx2QML64vwtZ8jDoZXshTfNCdYeMkK2LCOLG0wkyXp0wwzAXr jjUjQWWz5M46knTdYgg2oU8hKg1OJZKJE+fOyD0+Eobgru3sumiNRlUxzlL1dTVX9J7J 1JSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=Nj8Q+hBv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id ot2-20020a17090b3b4200b0027769e8672fsi3333930pjb.119.2023.09.29.22.47.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Sep 2023 22:47:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=Nj8Q+hBv; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id F081983CE294; Fri, 29 Sep 2023 15:24:59 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233526AbjI2WYa (ORCPT + 99 others); Fri, 29 Sep 2023 18:24:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229508AbjI2WY3 (ORCPT ); Fri, 29 Sep 2023 18:24:29 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4E2A1A8; Fri, 29 Sep 2023 15:24:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=N4F2QfXt0qCvJT+KbS3ZaeUVFr/M0rdBm91MXelB3ww=; b=Nj8Q+hBv5VWBtOtoQ2qjL5pO5Z UzC6KFuZP4qUCUCH8d+zuiytkGx9+IrACFoQLP9WinUO46iUBl8P1jjmuogqeBDRUIC2uQyb7xckY XnANjE/5B2paNEFkfzos6qypBuSRDTW1ohstRa59pshV+T3ihWQSPE7/2WxYmKysGU6iOM4GbdxMK kLb9kNK8nVA9YmYIw6hWWZiGYVFWU4qn0NHbpFMmfWF9c3mIAY3nrV3uujoF6F2x2QM+Sb2Yg1gaa RpMhboXmDEies74dLbUPrekbZPPYK5sRynRUHL2+sSVenmvv0whk57ag+nsIJRw3HFSFwOQ5pBxAh aTeTFvMw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1qmLuE-00BIgB-NK; Fri, 29 Sep 2023 22:24:18 +0000 Date: Fri, 29 Sep 2023 23:24:18 +0100 From: Matthew Wilcox To: Mateusz Guzik Cc: Christian Brauner , Jann Horn , Linus Torvalds , viro@zeniv.linux.org.uk, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH v2] vfs: shave work on failed file open Message-ID: References: <20230928-kulleraugen-restaurant-dd14e2a9c0b0@brauner> <20230928-themen-dilettanten-16bf329ab370@brauner> <20230929-kerzen-fachjargon-ca17177e9eeb@brauner> <20230929-test-lauf-693fda7ae36b@brauner> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Fri, 29 Sep 2023 15:25:00 -0700 (PDT) On Fri, Sep 29, 2023 at 11:23:04PM +0200, Mateusz Guzik wrote: > Extending struct file is not ideal by any means, but the good news is that: > 1. there is a 4 byte hole in there, if one is fine with an int-sized counter > 2. if one insists on 8 bytes, the struct is 232 bytes on my kernel > (debian). still some room up to 256, so it may be tolerable? 256 isn't quite the magic number for slabs ... at 256 bytes, we'd get 16 per 4kB page, but at 232 bytes we get 17 objects per 4kB page (or 35 per 8kB pair of pages). That said, I thik a 32-bit counter is almost certainly sufficient.