Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1165231pxb; Thu, 7 Oct 2021 02:06:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzBd+g2owcRlWuMSzYrS6TrYbSwV5zQtJeu0VTcKZqe2WMDIUu1FPI/1EKXbaIfrEF2PERn X-Received: by 2002:aa7:8198:0:b0:44b:e191:7058 with SMTP id g24-20020aa78198000000b0044be1917058mr2899373pfi.39.1633597581105; Thu, 07 Oct 2021 02:06:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633597581; cv=none; d=google.com; s=arc-20160816; b=gjT+PdwTUpnRadUDhvgCfmp451cppYQNItrdhUUgruYOO2IJr89lFuFY0JaxWGE2Fl OMYCm6HSyJX50gYy3S65PGQ4wAdYsJnr/KBV8l3hmsZhGaxlmt2uqdlwGYp/Bt+5qm7Y 7OcsYW0qjWl/re+xQekquoJJ5t+PE0MUUsiBtOsH8KcR4sT2Gg2tQm/5O2fUkkng3nc3 7unnOBnN+xbCxXBIg2sdrWQ77I5nJfkzEvhWKp1IZym8C3pWA2NW/t5/RDt/jx6ZZv5p rSaSLsw4q/tjf5LCZmDyh75ZhBkZixH8oV0s0mRfHpl2T5FRSJ3+WNtAGtXcpdGX+ItI C+ZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=Zv8Tv4rJJfFHqzrSVN/3GNjBFv1U2bji4R95ypSUZJQ=; b=WnZFdO2ZWedM2Cuk0rjtutHGpO2ZPhDnwB5Spgx1WoQzrm8dLkNrgorSXPeR5YUGVI SohYa1VMKDVsPaD8kI15aqdqH9QOd420KOoq9HADSEeYY8DWmFenPQIoi9W0aoDEsd4d Ey4PmDGYT6nk19dbDtIGlntQki2fJ0R6/frGX8zRjempsydD2Rs90gbq7J1DxpLdtbrl mbuRE0U6YuxEtiWxeYk9oZcl36PtSjD1VNMJQTJn1iNubqAYgzbILTIp9A0rvtuw2zZZ 2uu/YLBHS7om1s6FonZvm328zjsXxH4fnk61lAGP7xsf9WZa13mPLXtzT4mYwJTCvFKJ N/dQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t18si30822075plr.31.2021.10.07.02.06.02; Thu, 07 Oct 2021 02:06:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232555AbhJGIn3 (ORCPT + 99 others); Thu, 7 Oct 2021 04:43:29 -0400 Received: from jabberwock.ucw.cz ([46.255.230.98]:45136 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232348AbhJGInP (ORCPT ); Thu, 7 Oct 2021 04:43:15 -0400 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id D39A11C0BD1; Thu, 7 Oct 2021 10:41:20 +0200 (CEST) Date: Thu, 7 Oct 2021 10:41:20 +0200 From: Pavel Machek To: Michal Hocko Cc: Suren Baghdasaryan , David Hildenbrand , John Hubbard , Andrew Morton , Colin Cross , Sumit Semwal , Dave Hansen , Kees Cook , Matthew Wilcox , "Kirill A . Shutemov" , Vlastimil Babka , Johannes Weiner , Jonathan Corbet , Al Viro , Randy Dunlap , Kalesh Singh , Peter Xu , rppt@kernel.org, Peter Zijlstra , Catalin Marinas , vincenzo.frascino@arm.com, Chinwen Chang =?utf-8?B?KOW8temMpuaWhyk=?= , Axel Rasmussen , Andrea Arcangeli , Jann Horn , apopple@nvidia.com, Yu Zhao , Will Deacon , fenghua.yu@intel.com, thunder.leizhen@huawei.com, Hugh Dickins , feng.tang@intel.com, Jason Gunthorpe , Roman Gushchin , Thomas Gleixner , krisman@collabora.com, Chris Hyser , Peter Collingbourne , "Eric W. Biederman" , Jens Axboe , legion@kernel.org, Rolf Eike Beer , Cyrill Gorcunov , Muchun Song , Viresh Kumar , Thomas Cedeno , sashal@kernel.org, cxfcosmos@gmail.com, Rasmus Villemoes , LKML , linux-fsdevel@vger.kernel.org, linux-doc@vger.kernel.org, linux-mm , kernel-team Subject: Re: [PATCH v10 3/3] mm: add anonymous vma name refcounting Message-ID: <20211007084120.GB15698@duo.ucw.cz> References: <20211005200411.GB19804@duo.ucw.cz> <6b15c682-72eb-724d-bc43-36ae6b79b91a@redhat.com> <20211006175821.GA1941@duo.ucw.cz> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/NkBOFFp2J2Af1nK" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --/NkBOFFp2J2Af1nK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > [...] > > > That "central facility" option can be as simple as "mkdir > > > /somewhere/sanitized_id", using inode numbers for example. You don't > > > really need IPC. > >=20 > > Hmm, so the suggestion is to have some directory which contains files > > representing IDs, each containing the string name of the associated > > vma? Then let's say we are creating a new VMA and want to name it. We > > would have to scan that directory, check all files and see if any of > > them contain the name we want to reuse the same ID. >=20 > I believe Pavel meant something as simple as > $ YOUR_FILE=3D$YOUR_IDS_DIR/my_string_name > $ touch $YOUR_FILE > $ stat -c %i $YOUR_FILE >=20 > YOUR_IDS_DIR can live on a tmpfs and you can even implement a policy on > top of that (who can generate new ids, gurantee uniqness etc...). >=20 > The above is certainly not for free of course but if you really need a > system wide consistency when using names then you need some sort of > central authority. How you implement that is not all that important > but I do not think we want to handle that in the kernel. For the record, yes, that is what I meant. Thanks, Pavel --=20 http://www.livejournal.com/~pavelmachek --/NkBOFFp2J2Af1nK Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRPfPO7r0eAhk010v0w5/Bqldv68gUCYV6ysAAKCRAw5/Bqldv6 8so3AJ95heGJRCzxbpdQQFfSmV03PcZOGwCgtziQNAZ2Yv2ZLm5e5UwviJ4kwxg= =TOZ1 -----END PGP SIGNATURE----- --/NkBOFFp2J2Af1nK--