Received: by 2002:a05:7412:518d:b0:e2:908c:2ebd with SMTP id fn13csp390880rdb; Thu, 5 Oct 2023 08:49:11 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF/rr9oJAwBbvF46uMTTFd4I5I1R6bPq/uVOAPlnamrs7APWXkLZv7DzGQsOw9uHb+fHlkd X-Received: by 2002:a17:903:41cc:b0:1bc:6861:d746 with SMTP id u12-20020a17090341cc00b001bc6861d746mr7225831ple.58.1696520951050; Thu, 05 Oct 2023 08:49:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696520951; cv=none; d=google.com; s=arc-20160816; b=Me07DC4xX+487qUDV9/FJGhuS2kbumxizlObZvqa+sOM3YOMWV7GJMBMnjxBEMNSlR Wu/SDOsTMVAIPgdNJEaZW7F5lAtNL/6pWtgPK9wN6nTDyTd2/7bm2TKxgbJsAVJZC3NA NvGlpZf9Cf4OOKjXLLzT0mUMyUUlGisMI4okK7U6e6LKN+wclSxo3ev87B8OhLNSurP8 znMmx/fut8x6n7G+UOo70L3Dih3BFaDbJ+y8koEoODmlz6WjASylhOyYK0VNSQeCENod +8+Y6UCXtCRz6mNONLHLoq3kDMCT65EMFFhJN0UNI/6I9E4Ieeq+rUcjpo4AjfYLDh1O GgeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=YXtjeW9JdbsAOiLNM143QmEMkW6sJ8krIsKqBhO1k2A=; fh=MNZ3NggYQP20OUPc5fExqpn0860qEa9A2qEsjC3aFhA=; b=JS8P+0khIh5osE2tcO2spoQnEhnWUt6D3B1VtfP4cXmf3nM6MjV+bpzvcZVKq5jaLT aa15+edNgkF0M3OFE85rquLhbwPzF4Q6YujcwELb8HZ9wv6w9XVIcC3tYDbJJHqP+tCz OVJVO4PHQC9F/PKDMI2cKnm0ZbbpISHIp9sI54tFYM9Q/ohAgAG6rFsVWor12u7a8fEA cTGMZ+TP3gF4ZPAz/mOV9rE/5RhTAAobDsT0Ey29x6OKyKY9ywb1VmbI3v+d7BOp4/NT xByIfVvk4lt8ZWiA67kG2eB/0YmcW4crNZouj34G/txQdqRnwoSgxE+eL/PIuLuhCNSt Z+KQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=PzLvWkjj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id iz19-20020a170902ef9300b001c603cfb5fasi1602659plb.155.2023.10.05.08.49.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 08:49:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=PzLvWkjj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 3ED42874E65E; Thu, 5 Oct 2023 08:49:09 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234409AbjJEPsv (ORCPT + 99 others); Thu, 5 Oct 2023 11:48:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233862AbjJEPsE (ORCPT ); Thu, 5 Oct 2023 11:48:04 -0400 Received: from mail-vs1-xe2b.google.com (mail-vs1-xe2b.google.com [IPv6:2607:f8b0:4864:20::e2b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2C3E749E0; Wed, 4 Oct 2023 22:09:11 -0700 (PDT) Received: by mail-vs1-xe2b.google.com with SMTP id ada2fe7eead31-4526d872941so301257137.1; Wed, 04 Oct 2023 22:09:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696482550; x=1697087350; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=YXtjeW9JdbsAOiLNM143QmEMkW6sJ8krIsKqBhO1k2A=; b=PzLvWkjjabIF9ofjpZO+ShzuGPsvzk60jFD2cwuIkh8JRpShJFXIRUD3cjXuvaUvE2 aHETRpqhiqROo9FuKx5j9ktm4+GaFYIN4xL/izUGLp2d1w4zJrqZ1jQEfqpIhjykcinQ oD+Cv02i/tim1dDZPBuFC6g2INQe7ae8+vY9w1/Kvv/QbFEfht+WuDmEMSSQbxFNGruy y5OFlo6NsgqoBM5JL45IU9E0vgHbcAdEFUn6CK8s6uSaYx6+2aKEl2ZvxSdQokhaowqf wkFXOW3SAm8yTOPcubQ/uD99lKmUPQbj+tX6ZdVxaUChx9UpigjYvIdGL3m3pMUqanjV ruGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696482550; x=1697087350; h=content-transfer-encoding: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=YXtjeW9JdbsAOiLNM143QmEMkW6sJ8krIsKqBhO1k2A=; b=G73tjMOGSi+MSa0URag05LZIvqXYAo9VKMRqpgn1laR1m8Udr51+csOQ4b1rNuC5S4 Y12E6IwhrIiQR4x4V45NyZaUWEEFo5VOmOuv83MLlLr7Kx8hvyHb7GMMIydIdQ1MY82V XvkJBCErNuSgicSdfcHkjTYFzA0cmJ8kzkX8e2rOTkKvXiPYguR4LHAEi+wk9OaQtmhh NdD6Z9QM0UKDu+JZ+JiA7Sz8J/2RCr1THrIDSAJh7cKETk4EVF1S6zmZFXrSHo7hMnRU mMR9Sb6G1Q0w/+ZFFUSMo2e1yxoGVc3yfl6SCJheI1nRUNTZYqGTSoOKNbQWnlIYnsjw ZoRw== X-Gm-Message-State: AOJu0Yw82GrGBH6ROWMalzo6y0Sa4zq+ZwnnSmGAs35Wnca1NOmQCDNb eT9u+qK52K2aBk3VP3nKu92xWNb2DjCNypZIHvw= X-Received: by 2002:a67:f64e:0:b0:452:60c5:20b with SMTP id u14-20020a67f64e000000b0045260c5020bmr4338723vso.15.1696482550170; Wed, 04 Oct 2023 22:09:10 -0700 (PDT) MIME-Version: 1.0 References: <20231004185530.82088-1-jlayton@kernel.org> <20231004185530.82088-3-jlayton@kernel.org> In-Reply-To: <20231004185530.82088-3-jlayton@kernel.org> From: Amir Goldstein Date: Thu, 5 Oct 2023 08:08:59 +0300 Message-ID: Subject: Re: [PATCH v2 89/89] fs: move i_generation into new hole created after timestamp conversion To: Jeff Layton Cc: Christian Brauner , Al Viro , Jan Kara , linux-kernel , linux-fsdevel Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Thu, 05 Oct 2023 08:49:09 -0700 (PDT) On Wed, Oct 4, 2023 at 9:56=E2=80=AFPM Jeff Layton wro= te: > > The recent change to use discrete integers instead of struct timespec64 > shaved 8 bytes off of struct inode, but it also moves the i_lock > into the previous cacheline, away from the fields that it protects. > > Move i_generation above the i_lock, which moves the new 4 byte hole to > just after the i_fsnotify_mask in my setup. Might be good to mention that this hole has a purpose... > > Suggested-by: Amir Goldstein > Signed-off-by: Jeff Layton > --- > include/linux/fs.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/linux/fs.h b/include/linux/fs.h > index 485b5e21c8e5..686c9f33e725 100644 > --- a/include/linux/fs.h > +++ b/include/linux/fs.h > @@ -677,6 +677,7 @@ struct inode { > u32 i_atime_nsec; > u32 i_mtime_nsec; > u32 i_ctime_nsec; > + u32 i_generation; > spinlock_t i_lock; /* i_blocks, i_bytes, maybe i_siz= e */ > unsigned short i_bytes; > u8 i_blkbits; > @@ -733,7 +734,6 @@ struct inode { > unsigned i_dir_seq; > }; > > - __u32 i_generation; > > #ifdef CONFIG_FSNOTIFY > __u32 i_fsnotify_mask; /* all events this inode= cares about */ If you post another version, please leave a comment here + /* 32bit hole reserved for expanding i_fsnotify_mask to 64bit */ Thanks, Amir.