Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp62047rdb; Mon, 22 Jan 2024 11:59:44 -0800 (PST) X-Google-Smtp-Source: AGHT+IFSJaIwy3tKZ2/m+UiVJKR01IuUS1y5QhtmdJkT4opNMKJwpE40GRg57irDPXdqfACDKN9h X-Received: by 2002:a17:902:cecc:b0:1d7:5c2c:ddc with SMTP id d12-20020a170902cecc00b001d75c2c0ddcmr1716926plg.18.1705953584285; Mon, 22 Jan 2024 11:59:44 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705953584; cv=pass; d=google.com; s=arc-20160816; b=b+H4q7tYrzMw1XAFUqy900v2RrqtK7BpDSSvbOCxm1nzXPqLsxwt81N41OR47xn73q OpnUavr4/31ni5hT1H/FId8QTtMuZ4vWFsrtkOuiTj3lMmu8L4m96zr0aWawdxhHeZjW QS90zaqjJEIJpE5TsmSN1pQbLfmlEk0D1yAIlv/PADfr4OGNW8RqRFqOg2shDbMFvcoX dLBS6g5BkwXYXHb6xtSEuavPtjBnNg23mf2BlvW/Fymn25VqlVqs2nu3E0R3uoNTS7Wy ih2jenUGmfmN6JLpcBDB17xaAFFIIexPE/gLzjzddX71iHysqdguDpiF4ae6ha1JWJWY K4FA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date; bh=VA0KmbWFJDt5VWk20tS2PLAjWEtIGeJb8mpRt1ZmpI4=; fh=UerIcNH8+yarGFkPyJjy3S6im0qOoLQjKOg+xljOgS0=; b=kXE4yIFMSCVMNwETZBY8lb5OPf5XuGzu8XMZ5GeIkk+X+/E5zL9JtfoxRuh4MrRKw0 zbvff0zsP48NeUeN/Q0+aKtPuwClEmKxjVKK6mpz+IAaoHiS/EQEhbwHq7y0jSQYB0uV QLJPSnb9RVJ57kk7fuJ9we1zKdLz9t5XoE/9Bs+Pzg8XcawKcvRlJqx0EbIGIpSB58M5 TYSNSekp9N8rKwq5bTlpe1P/Tuny9FTsoJuuQbzaBW2elyKPNAB32ImA/K/r7QseKb0E Oa4SnUj3B90JHetu2tbY9bTFZgFAkPo+4gDyWO+zKnXc3gvOM7jndwHKdCAShvCYZBki ZpDQ== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-34095-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-34095-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id i18-20020a170902eb5200b001d719dbfd91si6907058pli.332.2024.01.22.11.59.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 11:59:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-34095-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-34095-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-34095-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 42D5028D9D8 for ; Mon, 22 Jan 2024 19:58:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1D3053FE58; Mon, 22 Jan 2024 19:57:53 +0000 (UTC) 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