From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9DB6B38DF1 for ; Mon, 22 Jan 2024 19:57:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705953472; cv=none; b=GEjCCF6TynYGxW+Z/dTUMMwTpP2+7nOMi/8MVrg05q6CmoTaDl9ZW6se7DuX+OOyNWdvRgNyKF4+apmUNR5+wPIe+xcGXs20RE/NKhoHn+eUz22/e9tSkL+TOK0akfM4OgJ+3jtYWb9VQAyo5/W/Jw5HivNlaEYFez9TYXuo2nw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705953472; c=relaxed/simple; bh=yAPKDGQ0abWDeOmysxwknKnzQPzEDD1iGHrk0yXei8w=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=W7n1vtgwTPUxoqPhukS1xeRhPmLGvojpa8Ju9IpZdp5T3sw4GkdSe6r2JRhGWlvqnVh9ImG5uvddTV0Hub+YwELWeCJXKQW1+AW85vDkFEnjnSrzDCO9BtvEVdlUM4lxwgbc48TV/NtF5uS95eM2/RNLSbGGQuXjut6h720q9xU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id AD866C433F1; Mon, 22 Jan 2024 19:57:50 +0000 (UTC) Date: Mon, 22 Jan 2024 14:59:19 -0500 From: Steven Rostedt To: Mathieu Desnoyers Cc: Geert Uytterhoeven , Kees Cook , Linus Torvalds , linux-kernel@vger.kernel.org, Masami Hiramatsu , Mark Rutland , Andrew Morton , Christian Brauner , Al Viro , Ajay Kaher Subject: Re: [for-linus][PATCH 1/3] eventfs: Have the inodes all for files and directories all be the same Message-ID: <20240122145919.3eb8f9b9@gandalf.local.home> In-Reply-To: References: <20240117143548.595884070@goodmis.org> <20240117143810.531966508@goodmis.org> <20240122100630.6a400dd3@gandalf.local.home> <20240122125004.7bbf0b70@gandalf.local.home> X-Mailer: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Mon, 22 Jan 2024 13:35:43 -0500 Mathieu Desnoyers wrote: > > When an inode is no longer referenced, it is freed. When it is referenced > > again, I want it to be recreated with the same inode number it had > > previously. How would having a bitmask help with that? I need a way to map > > an ei structure with a unique number without adding another 4 bytes to the > > structure itself. > > As discussed in a separate exchange with Linus, why do you care so much about > not adding a 4 bytes field to the structure ? I'm trying to keep the memory overhead of tracing down as much as possible. 4 bytes for 2000 events (and growing) just adds to the memory footprint of tracing. And an eventfs_inode is the link between control of an event per instance. Thus, it may only be 8k for those 2000 events, but that's another 8k for each instance you use. You make 10 instances, that is now 80k. This is used in embedded systems as well, so every byte counts. But as Linus pointed out, the issue is moot, as the structure ends with a single 32bit int. And on 64 bit machines, there's likely a 4 byte hole that we can use there. -- Steve