Received: by 2002:a05:7412:518d:b0:e2:908c:2ebd with SMTP id fn13csp400759rdb; Thu, 5 Oct 2023 09:04:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGuegcH2KosUTJhc6p1/bPNjn1Z7gbn83qRZSdvmtJ49c9w3ZTVu6ahNuQtyeOcOZYbb7eA X-Received: by 2002:a17:90b:3ec7:b0:268:2658:3b01 with SMTP id rm7-20020a17090b3ec700b0026826583b01mr5362938pjb.39.1696521848236; Thu, 05 Oct 2023 09:04:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696521848; cv=none; d=google.com; s=arc-20160816; b=keuVd6OtJ0Qhqe7L6Vm+a29lT/BiIExonGjqdAzwehuNIjHmQXK/JNe81g8kVhJrgd eZntgofhNXH5jmhAdDD89e40ohCIawVk409d/4tm1FfoZWtQ+FzfmcaRMfy7f0yC5Zbb idA+fbikPaxYQr/BEWmBY3cDdzUSmEd4kjoviIAPjM7ROReJwVoB6grQ1XwnWMxFVqrz WnPfrTV/pPPgefbAjXVQ/i5eH6Ppp0fRocyeQls+fqZpuUmWK/s9UjKy/qLvzEFi7cBY FuOiV4RNKRoInd5cSOAplvSyFXqTFDr82A0UMik2uVaY/jvaNru13YKkQruTtpCeQr6h I/xg== 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=5kGRsW3ktDtW6m3KSjx2TUIO0ZRjHIgeK99H149BbmQ=; fh=MNZ3NggYQP20OUPc5fExqpn0860qEa9A2qEsjC3aFhA=; b=Sal5Hwgs/A2mNpLfoMy7xIUWV2zORo5FymDvTww96Fq8sNQzAcVNZM9z6ZGr905ZvJ uzI8Ok4qFoeBtb4hsE9wrLl26cX7i7cF5fJko1SIgZsa8WvZtqVzVPm95+0cvSz4V+vH rSe5DOOJBPpLqRVGkzMjY9AEkiNif1uhJFp/h7WUshRFPX/g2KjzvoAPgLVLYOop4rU/ 6oN4oUXS9WR3PoHDYGxmc9MZVp3zSo3TyjJrg2r1v+gqIXlsoTofip+0m3fT0mLwV84J +jfetBC2DxDjvjqSjqNzM+KxMKw9M2U9pQTjCF7f+1hNFXjN5p+s0+iqmO4rgmCg0lrn mDwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=SwB+zmR1; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id d18-20020a17090ab31200b002790e9120ccsi4013661pjr.61.2023.10.05.09.04.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 09:04:08 -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=@gmail.com header.s=20230601 header.b=SwB+zmR1; 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; 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 groat.vger.email (Postfix) with ESMTP id AB00F83887BF; Thu, 5 Oct 2023 09:03:36 -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 S234442AbjJEP7C (ORCPT + 99 others); Thu, 5 Oct 2023 11:59:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234735AbjJEP4w (ORCPT ); Thu, 5 Oct 2023 11:56:52 -0400 Received: from mail-vs1-xe34.google.com (mail-vs1-xe34.google.com [IPv6:2607:f8b0:4864:20::e34]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9ED6426FF2; Thu, 5 Oct 2023 06:07:13 -0700 (PDT) Received: by mail-vs1-xe34.google.com with SMTP id ada2fe7eead31-452b4fd977eso482463137.1; Thu, 05 Oct 2023 06:07:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696511232; x=1697116032; 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=5kGRsW3ktDtW6m3KSjx2TUIO0ZRjHIgeK99H149BbmQ=; b=SwB+zmR1nX4yd7qHWNv+ofaQR1t/QcqqKVrcA1uIB2qOPJzsDNQson3xdPaQ4dZ+j/ 6aH66sAlJhXrH4x8728ZXNKnn66V+JrKsRPRRQIjSry+qXy8xmid7g6VPRPdZcQuke7r LG+fYuJY20XqmH8sEtr0IPDylGOtAu4mPouWU6rLatGk43J0RHPOaTjNrYQE2fbXpNYG 8uECy+n6q0mV4e68CRw3GgrE3g0xPIUnqLPqDB58rzB9NGtiryUEIFBfVZuHzNDfPTF9 CFZHiyWXWvVjHqRFA/AfeKVqe1DZCiFWSZvXUII72QRvPuzzYHCClfGo9I7PGgOUsKNc Navw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696511232; x=1697116032; 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=5kGRsW3ktDtW6m3KSjx2TUIO0ZRjHIgeK99H149BbmQ=; b=sEXWNhzcfPWQQHhIYaO86x7FlIi1kMQnVyUvQgB0p/3EeT/f1BnwptqpUm2+u7w2Mk DW0nYY2dLnswNzLe7wALu3jECVWdGMpINxLDUtLLoTFG91FNdO9sbTRh3bmnEeZgtHfj djiZD/asfpD0rj43GiyRDSGHGFDyrKQS3tPvjrIvmSCam7yWZrFHlbrXs/uBTR6Mkk/j rPw7sTy+xCXxJmy9d/95fODu0ZTvQhLrD4w8h2+97JtVAlpgJBYLWrp4RDux0ZCpZb17 SvCKP11k+Dq5+c6fea08roX5QSthL507etwO35DvswlV4+rLzP+drmRWtLBf4gtDPU0q kSdA== X-Gm-Message-State: AOJu0YyKqE9sqQolDM5/hz2eSd54bV/JCv4bfLcUH1s8kb3L8XsELpx4 +HSdSyn+9dLHm+r6W4WvugY+aS4L6vnQv+krU5Y= X-Received: by 2002:a67:f65a:0:b0:44d:3f96:6c61 with SMTP id u26-20020a67f65a000000b0044d3f966c61mr5198137vso.30.1696511232660; Thu, 05 Oct 2023 06:07:12 -0700 (PDT) MIME-Version: 1.0 References: <20231004185530.82088-1-jlayton@kernel.org> <20231004185530.82088-3-jlayton@kernel.org> <9af5c896da0c39c66d0555879c04c23fd853c9de.camel@kernel.org> In-Reply-To: <9af5c896da0c39c66d0555879c04c23fd853c9de.camel@kernel.org> From: Amir Goldstein Date: Thu, 5 Oct 2023 16:07:01 +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=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, 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]); Thu, 05 Oct 2023 09:03:36 -0700 (PDT) On Thu, Oct 5, 2023 at 3:45=E2=80=AFPM Jeff Layton wro= te: > > On Thu, 2023-10-05 at 08:08 +0300, Amir Goldstein wrote: > > On Wed, Oct 4, 2023 at 9:56=E2=80=AFPM Jeff Layton = wrote: > > > > > > The recent change to use discrete integers instead of struct timespec= 64 > > > 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 t= o > > > 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= _size */ > > > 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 i= node cares about */ > > > > If you post another version, please leave a comment here > > > > + /* 32bit hole reserved for expanding i_fsnotify_mask to 64bit= */ > > > > Sure. > > I suppose we could create a union there too if you really want to > reserve it: > > union { > __u32 i_fsnotify_mask; > __u64 __i_fsnotify_mask_ext; > }; > No need. I was thinking it is going to be unsigned long i_fsnotify_mask; on 32bit arch, we either not support the high bitmask events or we fold them with the lower 32bit in the inode mask, because i_fsnotify_mask is an optimization to avoid going into inode marks iteration. Thanks, Amir.